Skip to content

feat(switch): add component tokens#8786

Merged
jcfranco merged 3 commits intoepic/7180-component-tokensfrom
jcfranco/7180-add-component-tokens-to-switch
Feb 21, 2024
Merged

feat(switch): add component tokens#8786
jcfranco merged 3 commits intoepic/7180-component-tokensfrom
jcfranco/7180-add-component-tokens-to-switch

Conversation

@jcfranco
Copy link
Copy Markdown
Member

@jcfranco jcfranco commented Feb 20, 2024

Related Issue: #7180

Summary

Adds the following component tokens (CSS props):

  • --calcite-switch-handle-background-color
  • --calcite-switch-handle-border-color
  • --calcite-switch-track-background-color
  • --calcite-switch-track-border-color
  • --calcite-switch-corner-radius
  • --calcite-switch-shadow

@jcfranco jcfranco requested a review from a team as a code owner February 20, 2024 19:27
@jcfranco jcfranco force-pushed the jcfranco/7180-add-component-tokens-to-switch branch from 7fe6824 to 1d5638d Compare February 20, 2024 19:27
Comment thread packages/calcite-components/src/components/switch/switch.scss Outdated
Comment thread packages/calcite-components/src/components/switch/switch.scss Outdated
@jcfranco jcfranco added the pr ready for visual snapshots Adding this label will run visual snapshot testing. label Feb 20, 2024
@macandcheese
Copy link
Copy Markdown
Contributor

There are some "invisible" height changes in Chromatic, lets make sure this won't affect layout somehow: https://www.chromatic.com/test?appId=6266d45509d7eb004aa254fb&id=65d535a602d615a0c2d7deba

@jcfranco jcfranco added pr ready for visual snapshots Adding this label will run visual snapshot testing. and removed pr ready for visual snapshots Adding this label will run visual snapshot testing. labels Feb 21, 2024
@jcfranco jcfranco merged commit fd7a6e1 into epic/7180-component-tokens Feb 21, 2024
@jcfranco jcfranco deleted the jcfranco/7180-add-component-tokens-to-switch branch February 21, 2024 23:16
@jcfranco
Copy link
Copy Markdown
Member Author

Forgot to bring this up sooner, but name-wise, do we prefer handle vs thumb? This might be the first instance of handle/thumb in a public property name (related to that UI part). I'm used to "thumb" and is slightly shorter, but wanted to confirm for consistency. cc @geospatialem @DitwanP

@geospatialem
Copy link
Copy Markdown
Member

Forgot to bring this up sooner, but name-wise, do we prefer handle vs thumb? This might be the first instance of handle/thumb in a public property name (related to that UI part). I'm used to "thumb" and is slightly shorter, but wanted to confirm for consistency.

We use handle for the list-item event, so lean towards handle, unless we want to differentiate between the list event and switch prop.

* Fires when the drag handle is selected.
*/
@Event({ cancelable: false }) calciteListItemDragHandleChange: EventEmitter<void>;

@driskull
Copy link
Copy Markdown
Member

I prefer handle since thumb might be confused with thumbnail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr ready for visual snapshots Adding this label will run visual snapshot testing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants