-
Notifications
You must be signed in to change notification settings - Fork 81
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
Proposal: start using enums instead of booleans for prop variants #187
Labels
high priority
Active blocker for a current project or just urgent
Comments
suzubara
added
status: needs requirements
This issue is NOT ready for development - it needs further scope clarification or questions answered
and removed
looking for feedback
labels
May 20, 2020
agreed this is the way to go! |
Closed
suzubara
added
the
high priority
Active blocker for a current project or just urgent
label
Jun 1, 2020
For requirements, I reworded this ticket to be about adding a type variant to the |
haworku
removed
the
status: needs requirements
This issue is NOT ready for development - it needs further scope clarification or questions answered
label
Jun 2, 2020
ahobson
pushed a commit
that referenced
this issue
Jun 4, 2020
Provide a size enum to eventually replace the small and big boolean props on Button re #187
ahobson
pushed a commit
that referenced
this issue
Jun 4, 2020
Provide a size enum to eventually replace the small and big boolean props on Button re #187
ahobson
pushed a commit
that referenced
this issue
Jun 4, 2020
Provide a size enum to eventually replace the small and big boolean props on Button re #187
ahobson
pushed a commit
that referenced
this issue
Jun 5, 2020
Provide a size enum to eventually replace the small and big boolean props on Button re #187
This was referenced Jun 5, 2020
ahobson
pushed a commit
that referenced
this issue
Jun 5, 2020
Provide a size enum to eventually replace the small and big boolean props on Button re #187
ahobson
added a commit
that referenced
this issue
Jun 5, 2020
* feat(button): size enum on Button component Provide a size enum to eventually replace the small and big boolean props on Button re #187 * feat(Button): Add deprecation warnings, size preferred * Log deprecation warnings * Prefer size over big/small; test that interaction * Comment deprecationWarning in production * Button prop deprecation starts in v1.6.0
This was referenced Jun 18, 2020
DanielMiller-agile6
pushed a commit
to DanielMiller-agile6/react-uswds
that referenced
this issue
Jun 25, 2020
…works#229) * feat(button): size enum on Button component Provide a size enum to eventually replace the small and big boolean props on Button re trussworks#187 * feat(Button): Add deprecation warnings, size preferred * Log deprecation warnings * Prefer size over big/small; test that interaction * Comment deprecationWarning in production * Button prop deprecation starts in v1.6.0
Merged
haworku
pushed a commit
that referenced
this issue
Jun 29, 2020
* feat(button): size enum on Button component Provide a size enum to eventually replace the small and big boolean props on Button re #187 * feat(Button): Add deprecation warnings, size preferred * Log deprecation warnings * Prefer size over big/small; test that interaction * Comment deprecationWarning in production * Button prop deprecation starts in v1.6.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have several components such as
Header
,Footer
,Button
, and maybe even aspects ofGrid
, with boolean props that can conflict.For example, you should not have the
big
andmedium
prop applied to the same footer. Some of this should be on the developer to use our props ... properly 😝... AND we also could starting using variants as well when helpful.Instead of booleans we could move towards a single prop named something like
size
ortype
that accepts one of these types. The types would be enums. How do folks feel about this? Is this something we could start code reviewing for and document as practice?Proposed requirements to close this issue:
Button
component (keep the old way of doing these props too but add a deprecation warning - it can be removed fully in next major release ).The text was updated successfully, but these errors were encountered: