-
-
Notifications
You must be signed in to change notification settings - Fork 114
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 prop size to the RadioButtonGroup component #1541
feat: add prop size to the RadioButtonGroup component #1541
Conversation
Features
Bug FixesContributors |
font-size: ${FONT_SIZE_TEXT_LARGE}; | ||
font-size: ${props => fontSizeMap[props.size] || fontSizeMap.medium}; | ||
color: ${props => props.inverseLabel}; | ||
padding: 0 ${PADDING_LARGE}; | ||
padding: 0 ${props => paddingMap[props.size] || paddingMap.medium}; |
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.
@TahimiLeonBravo checks here that the size is being changed.
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.
@yvmunayev @rgah2107 I agree with this size changes +1
const sizeMap = { large: '3.1rem', medium: '2.6rem', small: '1.76rem', 'x-small': '1.26rem' }; | ||
const StyledMarker = attachThemeAttrs(styled.span)` | ||
position: absolute; | ||
background: ${props => props.palette.background.main}; | ||
opacity: 0; | ||
top: 0; | ||
bottom: 0; | ||
margin: auto; | ||
height: 2.6rem; | ||
height: ${props => sizeMap[props.size] || sizeMap.medium}; |
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.
@TahimiLeonBravo will be able to change to 2.5rem here?
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.
@rgah2107 @yvmunayev 2.6rem
is right because we need to make the marker a little higher than the container.
Also, we need to change by small='1.8rem'
and 'x-small': '1.3rem'
because right now this is not centered vertically
}; | ||
const paddingMap = { | ||
large: PADDING_LARGE, | ||
medium: PADDING_MEDIUM, |
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.
let's use for
medium: PADDING_LARGE
large: PADDING_X_LARGE
fix: #1537
Changes proposed in this PR:
add prop size to the
RadioButtonGroup
componentI have followed (at least) the PR section of the contributing guide.
@nexxtway/react-rainbow