react-grid-system icon indicating copy to clipboard operation
react-grid-system copied to clipboard

Col `component` prop typings

Open joeyfigaro opened this issue 2 years ago • 2 comments

Looks like Col is currently expecting its component prop to be of type (() => string) | string–documentation lists the expected type as elementType, and passing it a component works as expected.

    type ColProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {
        width?: "auto" | number | string,
        debug?: boolean,
        offset?: Offsets,
        push?: Push,
        pull?: Pull,
        style?: object,
        component?: (() => string) | string
    } & ScreenClassMap<number | "content">;

joeyfigaro avatar Jan 25 '22 15:01 joeyfigaro

Looks like (p: ColProps) => JSX.Element may be a better replacement here.

joeyfigaro avatar Jan 25 '22 17:01 joeyfigaro

Any updates on this?

JanderSilv avatar Sep 13 '23 19:09 JanderSilv