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

ButtonGroupの左右paddingを16pxにする #77

Merged
merged 3 commits into from
Jun 12, 2020

Conversation

maktak1995
Copy link
Contributor

close #74

size: medium のみ

@maktak1995 maktak1995 self-assigned this Jun 12, 2020
> = {
small: {
minWidth: "63px",
height: "32px",
padding: 1,
Copy link
Contributor

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
これ参考にしてもらえると

Copy link
Contributor Author

Choose a reason for hiding this comment

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

了解です!
horizontalPaddingを定義して追加することにします

Copy link
Contributor

@kinokoruumu kinokoruumu left a 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`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
size === "small" ? `${theme.spacing * 1}px` : `${theme.spacing * 2}px`;
size === "small" ? `${theme.spacing}px` : `${theme.spacing * 2}px`;

@maktak1995 maktak1995 merged commit a5b648f into master Jun 12, 2020
@maktak1995 maktak1995 deleted the issue-74-fix-buttongroup-padding branch June 12, 2020 09:22
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.

ButtonGroupの左右paddingを16pxにする
2 participants