-
Notifications
You must be signed in to change notification settings - Fork 90
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(Button): add xs Button size #663
Conversation
Preview is ready. |
ac2b5d2
to
c029bbf
Compare
c029bbf
to
ed129a6
Compare
@@ -122,7 +122,7 @@ export function withTableActions<I extends TableDataItem, E extends {} = {}>( | |||
disabled={disabled} | |||
className={BUTTON_CLASSNAME} | |||
onClick={this.handleActionsButtonClick.bind(this, {item, index})} | |||
size={rowActionsSize} | |||
size={rowActionsSize as ButtonSize} |
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.
Only for Button component
ed129a6
to
024051a
Compare
@@ -54,7 +54,7 @@ export type TableActionConfig<I> = TableAction<I> | TableActionGroup<I>; | |||
|
|||
export interface WithTableActionsProps<I> { | |||
getRowActions: (item: I, index: number) => TableActionConfig<I>[]; | |||
rowActionsSize?: ButtonSize; | |||
rowActionsSize?: Exclude<ButtonSize, 'xs'>; |
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.
Prop is used for Button and Menu components at the same time. But Menu doesn't support xs size.
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.
maybe add new type here?
src/components/Button/Button.scss
Outdated
&_side_right { | ||
margin-right: 6px; | ||
width: var(--yc-button-icon-size); | ||
} |
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.
No need to set these styles, width: var(--yc-button-height);
does all the work. Same relates to &_side_left
/** | ||
* common sizes for Menu and Button | ||
*/ | ||
export type RowActionsSize = 's' | 'm' | 'l' | 'xl'; |
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.
TableRowActionsSize
would be better and can be exported safely
e2c6825
to
5568359
Compare
No description provided.