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

feat: support custom breakpoints #6253

Merged
merged 2 commits into from Mar 4, 2022
Merged

feat: support custom breakpoints #6253

merged 2 commits into from Mar 4, 2022

Conversation

kyletsang
Copy link
Member

Closes #6247

Loosens the types for any breakpoint-related prop so it takes in any string. For the components that use a hard coded breakpoint list, I've allowed the user to specify their own list of breakpoints in the ThemeProvider so these components can take advantage of it.

Haven't added docs yet. Wanted to make sure the approach looks good before doing so.

Copy link
Collaborator

@golota60 golota60 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 lgtm

@@ -36,9 +36,9 @@ export interface ColProps
lg?: ColSpec;
xl?: ColSpec;
xxl?: ColSpec;
[key: string]: any;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is rough -- [key: string]: any allows pretty much any prop. But I don't think there's any good way to avoid it. These are top-level properties so [key: string]: ColSpec would produce an incompatible index signature error.

@kyletsang kyletsang merged commit 0910a21 into master Mar 4, 2022
@kyletsang kyletsang deleted the loosen-breakpoints branch March 4, 2022 05:15
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

Successfully merging this pull request may close these issues.

How to use custom breakpoints in components and types?
3 participants