-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat(button): add destructive, secondary button type #1424
Conversation
🚀 Deployed on https://pr-1424--dhis2-ui.netlify.app |
Passing run #3133 ↗︎
Details:
Review all test suite changes for PR #1424 ↗︎ |
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.
@Birkbjo - please note this change to propTypes, probably affects the TypeScript types you're working on
Thanks for the heads up. This should just be a simple boolean in the types. I will update the alpha branch once this is merged, and create a PR for it. I abandoned the XOR typings, as I don't think it's worth the complexity (and readability of the resulting types). Which is also in line with option 3 of @Mohammer5 suggestion above. |
feat(shared-prop-types): extract secondary button prop from exclusive props style(button): adjust secondary destructive font weight fix(button): remove exclusivity of type props docs(button): add destructive secondary example
184c64a
to
b72a04a
Compare
Implements LIBS-544 / UX-157
Description
This PR implements, or allows, buttons that are both
destructive
andsecondary
.secondary
prop is now used as a modifier rather than a standalone type, as it can be applied to bothbasic
anddestructive
types. (Usingsecondary
alone is considered a modifier applied to the defaultbasic
type.)In order to allow this, the
secondary
prop is no longer part of the shared prop types provided by UI constants.Question: is this a breaking change? I believe all button usages are unaffected by this change, but I'm not sure if changing
PropType
definitions always counts as a breaking change.Checklist
All points above should be relevant for feature PRs. For bugfixes, some points might not be relevant. In that case, just check them anyway to signal the work is done.
Screenshots