Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Col component prop typings #260

Open
joeyfigaro opened this issue Jan 25, 2022 · 2 comments
Open

Col component prop typings #260

joeyfigaro opened this issue Jan 25, 2022 · 2 comments

Comments

@joeyfigaro
Copy link

joeyfigaro commented Jan 25, 2022

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
Copy link
Author

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

@JanderSilv
Copy link

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants