sealninja / react-grid-system

A powerful Bootstrap-like responsive grid system for React.
https://sealninja.github.io/react-grid-system/
MIT License
817 stars 83 forks source link

Col `component` prop typings #260

Open joeyfigaro opened 2 years ago

joeyfigaro commented 2 years ago

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 commented 2 years ago

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

JanderSilv commented 1 year ago

Any updates on this?