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
Add styled-system to project #1711
Conversation
@@ -1,17 +1,18 @@ | |||
import React from "react" | |||
import styled from "styled-components" | |||
import { margin } from "styled-system" |
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.
FYI @ryancreatescopy - here's an example of how to add this to a component.
- import from styled-system (e.g.
import { margin } from "styled-system"
) - add to a styled component (e.g.
${margin}
) - pass all props the component receives to the styled component (see
...props
code below)
That allows us to pass all margin props (m
, mt
, mr
, mb
, ml
) to the component.
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.
Ok, I think this makes sense. Looks good.
@ryancreatescopy - I removed the default ButtonLink margin. This is ready for your review! |
Description
Related Issue
None