-
Notifications
You must be signed in to change notification settings - Fork 31
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
Improve Palette Types #77
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug In Documentation
As of now it lists that the second argument for palette is always
any
, but when there are three arguments the type interfaces enforces the second argument to be of typenumber
. This can be better labeled in the documentation/readmeFeature Request
It seems a bit weird to switch on the expected types, where the second value can be either the index or the default value. A possible extension of this could be to actually allow for
string | number
for both the first and second arguments and to declare the default as the prop within the component.What this allows is for each argument to be either a string or number, and to access either an array or an object in the same way. This gives for some nicer formatting of palette when there are several different color organization options, in addition to extending the model to support more options.
If going with the latter solution, the documentation issue is moot and can be ignored.
The text was updated successfully, but these errors were encountered: