-
Notifications
You must be signed in to change notification settings - Fork 99
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(Actions): Add Actions component #139
Conversation
atoms.color.link, | ||
]; | ||
|
||
if (inline) { |
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.
Thoughts on hoisting this before the ActionsConsumer
? If it's inline
it has no contextual behaviour so can return fast.
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.
Ah yeah, nice idea 👍
<span className={styles.overlayContainer}> | ||
{children({ | ||
style: {}, | ||
className: classnames(defaultStyles, touchableStyles, [ |
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.
Any reason for having an array as the third parameter here, rather than flat parameters?
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.
More good ideas 👍
@@ -1,5 +1,7 @@ | |||
export default () => ({ | |||
'.transition_fast': { transition: 'all .125s ease' }, | |||
'.transition_fast': { | |||
transition: 'transform .125s ease, opacity .125s ease', |
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.
💪
This PR adds the initial
Actions
component (formerly known asButtonGroup
), for rendering a responsive group of buttons/links at the bottom of a form/card/etc.This PR also makes the following changes:
flexDirection
prop toBox
, e.g.<Box flexDirection={['column', 'row']}>
none
values for margin and padding. The corresponding values in the CSS were incorrectly set tonone
rather than0
.Example usage
Mobile
Desktop
Development Notes
Internally, we've made the following changes.
box-sizing: border-box
fromBox
into our CSS reset, so that link elements rendered byTextLinkRenderer
use the correct box model.Overlay
to centralise rules for absolutely positioned cover elements, as well as aFieldOverlay
component to centralise form overlay rules. This was done to ensure that the focus styles are consistent betweenTextLinkRenderer
andButton
, but the idea is that should expand this pattern to other fields going forward.transition
atoms to transform and opacity.