Skip to content

Conversation

@DmitrySharabin
Copy link
Member

@DmitrySharabin DmitrySharabin commented Nov 25, 2024

#107 seems to be a blocking issue for #167, so let's try to address it first.

This PR adds the label prop to <color-swatch> and the corresponding part for custom styling. As @LeaVerou suggested in #107, the implementation is inspired by the <option> element.

There is no separate slot for the value of this attribute because I couldn't think of any use cases where it might be needed (I might miss something, though).

Live preview: https://deploy-preview-171--color-elements.netlify.app/src/color-swatch/#the-label-attribute

@netlify
Copy link

netlify bot commented Nov 25, 2024

Deploy Preview for color-elements ready!

Name Link
🔨 Latest commit c1675ca
🔍 Latest deploy log https://app.netlify.com/sites/color-elements/deploys/6744b020a8cabd0008c9b77a
😎 Deploy Preview https://deploy-preview-171--color-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@LeaVerou LeaVerou left a comment

Choose a reason for hiding this comment

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

LGTM from a cursory look

@DmitrySharabin DmitrySharabin merged commit 5cc9dde into main Nov 27, 2024
4 checks passed
@DmitrySharabin DmitrySharabin deleted the color-swatch-label branch November 27, 2024 10:34
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 this pull request may close these issues.

2 participants