canvas-kit icon indicating copy to clipboard operation
canvas-kit copied to clipboard

Segmented Control Redesign with Text Capabilities

Open xTena opened this issue 6 years ago • 4 comments

🚀 Feature Proposal

The Icon Button Toggle Group doesn't allow text. Will be great if we can pass only text, only an Icon or both.

Motivation

I have to build something similar recently because we need in our project a Button Toggle Group with only text.

Screenshot 2019-09-19 at 12 03 07

We'll love to use Canvas kit instead.

xTena avatar Sep 19 '19 11:09 xTena

@xTena thanks for the feature request, I'll shop this around our design team. This is a use case that is slightly beyond just an extension of the icon button. Iconography is inherent to that design. Is there any context you can give for this idea? Maybe more about the surrounding feature that you'll need something like this in?

lychyi avatar Sep 30 '19 20:09 lychyi

Hi @lychyi,

Thank you very much for your answer :)

I understand is not possible to change this component but it would great if we can have one toggle group that allow text.

We had to create one in the app because we didn't have it available in Canvas. Let me know which information you need and I can send it to you for a different channel (I can't post any info of the project here).

Thanks a million, Ximena

xTena avatar Oct 14 '19 10:10 xTena

We restrict the allowed children in TypeScript and we can fix this here: https://github.com/Workday/canvas-kit/blob/3322ef6ba113940373412840edd14d35a7a3093c/modules/react/segmented-control/lib/SegmentedControl.tsx#L11

willklein avatar Jan 20 '22 21:01 willklein

I would like to work on this.

anishatulai avatar Apr 04 '22 20:04 anishatulai

Making a note that Segmented Control should support theming. See #550.

alanbsmith avatar Sep 08 '22 22:09 alanbsmith

So if we closed this issue, should we create a new one for new SegmentedControl component? I thought this issue was for this.

RayRedGoose avatar Sep 08 '22 22:09 RayRedGoose