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

border-radiusをtheme経由で定義できるように #159

Merged
merged 6 commits into from
Aug 7, 2020

Conversation

youchann
Copy link
Contributor

@youchann youchann commented Aug 6, 2020

close: #117

@youchann youchann added the enhancement New feature or request label Aug 6, 2020
@youchann youchann self-assigned this Aug 6, 2020
@youchann youchann changed the title wip: border-radiusやborderをtheme経由で定義できるように border-radiusをtheme経由で定義できるように Aug 6, 2020
@youchann
Copy link
Contributor Author

youchann commented Aug 6, 2020

利用者側が全体でborderのサイズを変更するユースケースを想定できなかったので、borderはtheme経由で定義しない。

@@ -3,7 +3,7 @@
exports[`ActionButton component testing ActionButton 1`] = `
<DocumentFragment>
<button
class="sc-AxjAm hEzxlr"
class="sc-AxjAm bfURWn"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

snapshotに変化のあるコンポーネントがちらほらありますが、実際にUIに差があるのかを見ていただけると:bow:


export const Container = styled.button`
display: flex;
align-items: center;
padding: ${Space * 0.75}px ${Space}px;
border: 0;
cursor: pointer;
border-radius: ${Radius.MEDIUM};
border-radius: ${({ theme }) => theme.radius}px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

theme.spacingと同じノリで扱える

@@ -50,15 +50,15 @@ const getContainerColorStyles = (
background: theme.palette.white,
color: theme.palette.black,
boxShadow: "none",
border: `${Size.Border.Small} solid ${theme.palette.divider}`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

borderは直打ちさせる

Copy link
Contributor

@maktak1995 maktak1995 left a comment

Choose a reason for hiding this comment

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

LGTMです!

@youchann youchann merged commit 726aa26 into master Aug 7, 2020
@youchann youchann deleted the enable-use-border-and-radius-via-theme branch August 7, 2020 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BorderやRadiusの定数をTheme経由で利用できるようにする
2 participants