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

SegmentedControl--options.label should be a ReactNode, not just a string #6761

Open
HarperTime opened this issue Apr 9, 2024 · 0 comments · May be fixed by #6797
Open

SegmentedControl--options.label should be a ReactNode, not just a string #6761

HarperTime opened this issue Apr 9, 2024 · 0 comments · May be fixed by #6797

Comments

@HarperTime
Copy link

HarperTime commented Apr 9, 2024

Environment

  • Package version(s): v5
  • Browser and OS versions: n/a

Feature request

On the SegmentedControl, I'd like to be able to use Icons instead of (or in addition to) labels. However, right now it only allows strings. Consider changing the type of the label fields in options to React.ReactNode or something more flexible. Right now its too limited. Thanks!

Examples

<SegmentedControl
    options={[
        {
            label: {<Icon icon='Add' />},
            value: "add",
        },
    ]}
    defaultValue="list"
/>
@ahmadJT ahmadJT linked a pull request May 14, 2024 that will close this issue
3 tasks
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 a pull request may close this issue.

1 participant