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

Fix to have colon conditional in Toggle Button #540

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

isacoder
Copy link
Collaborator

Description

This is a fix update for Toggle button, that will make : sign conditional to receiving category label.

Fixes #539

Screenshoot
Screenshot 2025-01-09 at 21 57 47

Screenshot 2025-01-09 at 21 57 55

@isacoder isacoder added the bug Something isn't working label Jan 10, 2025
@isacoder isacoder requested a review from atomworks January 10, 2025 04:08
@isacoder isacoder self-assigned this Jan 10, 2025
Copy link
Collaborator

@atomworks atomworks left a comment

Choose a reason for hiding this comment

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

Just one small request, otherwise this looks good.

@@ -23,7 +23,8 @@ const ToggleButton: React.FC<IToggleButton> = ({ options, categoryLabel, selecte

return (
<FilterButton icon={options[selectedIndex].icon} onClick={() => onToggleCallback(selectedIndex)} {...{design}} {...props}>
{`${categoryLabel} : ${options[selectedIndex].text}`}
{ categoryLabel && `${categoryLabel} : `}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we remove the whitespace between the label and the :, so it sits against it, for example: "Layout: Grid"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for catching this one :D!

@isacoder isacoder requested a review from atomworks January 16, 2025 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

: is not conditionally shown in ToggleButton
2 participants