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

feat(tag): introduce size prop to Tag component #49

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

rahmatrhd
Copy link
Member

No description provided.

...props
}: TagProps) => {
const [visible, setVisible] = useState(true);
if (!visible) return null;
return (
<TagWrapper>
<StyledTag {...props} type={type} color={color} closable={closable} icon={icon ? true : false}>
<StyledTag {...props} type={type} color={color} closable={closable} icon={icon ? true : false} size={size}>
Copy link
Member

Choose a reason for hiding this comment

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

If we are only changing the font-size using this prop then let's rename it to fontSize to avoid confusion?

Copy link
Member Author

Choose a reason for hiding this comment

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

this new prop is to let user customize the Tag sizing using small | medium | large value without having to care about font sizing or other styling. And apparently, this only needs to change the font size because the wrapper box size will also adapt based on the font size.

on the other hand, if user need to customize this component's font size they can use props.style

@rahmatrhd rahmatrhd merged commit ff46faa into main Jun 25, 2024
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.

3 participants