11import React , { ElementType } from 'react'
22import styled from 'styled-components'
3- import {
4- PolymorphicProps ,
5- PolymorphicRef
6- } from '../types/PolymorphicElementProps'
3+ import { PC , PP , PR } from '../types/PolymorphicElementProps'
74import { cssCentering } from '../utils/styles'
85
96const paddingMap = {
@@ -26,24 +23,25 @@ const EmptyStatePlaceholderContainer = styled.div<EmptyStatePlaceholderContainer
2623 text-align: center;
2724`
2825
29- export type EmptyStatePlaceholderProps < T extends ElementType = 'div' > =
30- PolymorphicProps < T >
26+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
27+ export interface EmptyStatePlaceholderProps { }
3128
32- export const EmptyStatePlaceholder = React . forwardRef (
33- < T extends ElementType > (
34- props : EmptyStatePlaceholderProps < T > ,
35- ref ?: PolymorphicRef < T >
36- ) : JSX . Element => {
37- const { padding, fullHeight, as = 'div' , ...rest } = props
29+ export const EmptyStatePlaceholder : PC < 'div' , EmptyStatePlaceholderProps > =
30+ React . forwardRef (
31+ < T extends ElementType > (
32+ props : PP < T , EmptyStatePlaceholderProps > ,
33+ ref ?: PR < T >
34+ ) => {
35+ const { padding, fullHeight, as = 'div' , ...rest } = props
3836
39- return (
40- < EmptyStatePlaceholderContainer
41- as = { as }
42- ref = { ref }
43- fullHeight = { fullHeight }
44- padding = { padding }
45- { ...rest }
46- />
47- )
48- }
49- )
37+ return (
38+ < EmptyStatePlaceholderContainer
39+ as = { as }
40+ ref = { ref }
41+ fullHeight = { fullHeight }
42+ padding = { padding }
43+ { ...rest }
44+ />
45+ )
46+ }
47+ )
0 commit comments