-
Notifications
You must be signed in to change notification settings - Fork 77
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
Allow for Segmented Control to Display Icon Only #6413
Comments
This one is on my list as well. Thanks for filing this, @apfister. |
+1 |
Would be a nice add. We can probably do as we do with button, etc., and adjust padding when only an icon property is provided. |
This use case also surfaced in a Community thread on 5/18, in which the use case is to display icons without text in the component. |
Figma file ready for this update. |
To achieve this, we'll need to prevent using |
@macandcheese Added a While working on this, I also found using icons instead of text for the label could be a potential workaround (see codepen). |
Since it has icon-start/end, is the workaround workflow possibly confusing? I suppose |
How do you mean?
We already use
OK, so I tracked down the behavior I called out in my earlier comment and it looks like using |
Thanks for the catch, @ashetland! I'll make the appropriate adjustments. |
…e empty with a start/end icon (#9300) *Related Issue:** #6413 ## Summary This updates `segmented-control-item` to display a centered icon when specified and the item is empty. **Note:** this removes using `value` as a fallback label as non-breaking for the following reasons: * this behavior is [intentional](https://github.com/Esri/calcite-design-system/blob/main/packages/calcite-components/src/components/segmented-control-item/segmented-control-item.e2e.ts#L38-L46), but there is no explicit spec for it in the [original issue](#5), [PR](#72) nor [documentation](https://developers.arcgis.com/calcite-design-system/components/segmented-control/) * it is inconsistent with how other components expect text to be provided * it [breaks if there's any whitespace](https://codepen.io/jcfranco/pen/XWwWGEy?editors=1000) * the current behavior will lead to label that might not be user-friendly in most cases (e.g., casing, localization)
Installed and assigned for verification. |
🍡 Verified locally on |
Description
Allow for the Segmented Control (and item?) display an icon only, without having to specify text.
In the image below, I'd like only the icons to be displayed:
Acceptance Criteria
maybe
iconOnly
as a property? or just display only the icon if that's the only thing specified.Relevant Info
No response
Which Component
Segmented Control / Segmented Control Item
Example Use Case
No response
Esri team
N/A
The text was updated successfully, but these errors were encountered: