-
Notifications
You must be signed in to change notification settings - Fork 616
Button & Link Updates #330
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
Conversation
This pull request is automatically deployed with Now. |
src/Link.js
Outdated
const hoverColor = style({ | ||
prop: 'hoverColor', | ||
cssProperty: 'color', | ||
key: 'colors' | ||
}) | ||
|
||
const styledLink = styled('a')` | ||
const Link = ({is: Tag, children, ...rest}) => { |
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.
I did this because I couldn't figure out how to pass a dynamic tag based on a prop to styled
Co-Authored-By: emplums <emplums@github.com>
@@ -32,6 +58,32 @@ exports[`Link renders without any props 1`] = ` | |||
} | |||
|
|||
<a | |||
blacklist={ |
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.
@shawnbot do you know why this is happened and if it's okay or not? I think it has something to do with calling styled(Link)
instead of styled('a')
but I'm not positive 🤔
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.
I don't know, but I'm 90% sure it's a system-components
thing. Maybe we could use clean-tag if we just want to keep those attributes out of the resulting DOM? 🤔
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.
Code looks great, thanks for this!
width
propblock
prop on ButtonButtonLink
- users should use a<Link is='button'>
for this use case. The model here should beButton
is a UI element that is styled like a button.Link
is a UI element that is styled like a link. You can change the tag as needed.Closes #312
Merge checklist