-
Notifications
You must be signed in to change notification settings - Fork 10
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
ButtonGroupの左右paddingを16pxにする #77
Conversation
> = { | ||
small: { | ||
minWidth: "63px", | ||
height: "32px", | ||
padding: 1, |
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.
左右にしか当てないならhorizontalPaddingとかの方がいいな(もし上下も定義するなら名前かぶるので。)
それとpaddingはbuttonのsizeというよりstyleかな...
あと、倍率を定義するならそういう命名の方が良さそう
https://github.com/voyagegroup/ingred-ui/blob/master/src/components/Button/Button.tsx#L115
これ参考にしてもらえると
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.
了解です!
horizontalPaddingを定義して追加することにします
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.
LGTMです!
@@ -28,6 +29,10 @@ const ButtonGroup: React.FunctionComponent<Props> = ({ | |||
disabled = false, | |||
children, | |||
}) => { | |||
const theme = useTheme(); | |||
const horizontalPadding = | |||
size === "small" ? `${theme.spacing * 1}px` : `${theme.spacing * 2}px`; |
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.
size === "small" ? `${theme.spacing * 1}px` : `${theme.spacing * 2}px`; | |
size === "small" ? `${theme.spacing}px` : `${theme.spacing * 2}px`; |
close #74
size: medium
のみ