-
Notifications
You must be signed in to change notification settings - Fork 99
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: add Palette component #1304
Conversation
Playwright Test Component is ready. |
Preview is ready. |
Hey @Ruminat! We've discussed ur pr with @amje @ValeraS and have some suggestions for u:
interface PaletteOption {
value: string;
content: React.ReactNode;
title?: string; // HTML title
disabled?: boolean;
}
interface PaletteProps extends DOMProps, QAProps {
value?: string[];
defaultValue?: string[];
onUpdate?: (value: string[]) => void;
onFocus?: React.FocusEventHandler;
onBlur?: React.FocusEventHandler;
disabled?: boolean;
name?: string;
options: PaletteOption[];
size?: ButtonSize;
}
|
I'll add the Do we need the |
Hmm, we probably don't need it. Example in Storybook sounds quite enough |
Turned the component into |
@korvin89 ping |
@amje ping |
src/components/Palette/Palette.scss
Outdated
font-size: 16px; | ||
} | ||
&_size_s &__option { | ||
font-size: 18px; | ||
} | ||
&_size_m &__option { | ||
font-size: 20px; | ||
} | ||
&_size_l &__option { | ||
font-size: 24px; | ||
} | ||
&_size_xl &__option { | ||
font-size: 28px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need shift the sizes down, they're a bit bigger than they should be. You can check font sizes of Button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shifted the font sizes down according to the Button
's --_--icon-size
: 12px
/16px
/16px
/16px
/20px
The font sizes of Button
are basically the same (except for the xl
), so I didn't use them.
In RTL mode keyboard navigation is broken |
Fixed |
@amje ping |
DATAUI-2067
Palette
— a basic grid with elements you can select/unselect (a grid of checkboxes basically).Can be customized to display anything basically icons/GIFs/images/reactions/colors and so on: