Skip to content

Allow filtering of permitted formats - #1

Open
g30r93g wants to merge 1 commit into
vatsalpipalava:mainfrom
g30r93g:main
Open

Allow filtering of permitted formats#1
g30r93g wants to merge 1 commit into
vatsalpipalava:mainfrom
g30r93g:main

Conversation

@g30r93g

@g30r93g g30r93g commented Sep 2, 2025

Copy link
Copy Markdown

Summary

Adds an allowedFormats prop to control which color formats are available and hides the format selector if there’s only one option. Keeps sensible defaults and remains backward compatible.

Key Changes

  • allowedFormats prop: Adds optional allowedFormats?: Array<'HEX' | 'RGB' | 'HSL'> with default ['HEX','RGB','HSL'] to keep current behavior unchanged.
  • Conditional format selector: Renders the <Select> only when there’s more than one allowed format, and filters options by allowedFormats.
  • Minor tidy-up: Import ordering and small whitespace normalization in inline styles.

API

New prop: allowedFormats?: Array<'HEX' | 'RGB' | 'HSL'> (default: ['HEX','RGB','HSL']). Backward compatible.
Behavior: Selector hides when only one format is permitted.

@vercel

vercel Bot commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

@g30r93g is attempting to deploy a commit to the vatsalpipalava Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant