-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 string literals for enums! #2484
Conversation
fix timepicker testsPreview: documentation | landing | table |
fix DateInputTestsPreview: documentation | landing | table |
Merge branch 'develop' of github.com:palantir/blueprint into gg/string-literalsPreview: documentation | landing | table |
FIREFOX, | ||
IE, | ||
UNKNOWN, | ||
WEBKIT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why an integer enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's entirely internal to this file (not exported) and i declared in the description that actual enum
types should prefer numbers unless they have a good reason for strings.
unblocked! functional docs |
Merge branch 'develop' of github.com:palantir/blueprint into gg/string-literalsPreview: documentation | landing | table |
Fixes #2476
convert many former string enums to
const/type
pairs so you can do<Button intent="primary" />
👍the new convention is as follows:
enum
types should always use numbers, unless there's a very good reason for string typesconst/type
pairconst/type
pairconverted enums: