Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat(tag): change children propType to node
Allows passing a node as children instead of just a string. Makes it easier to
control the way children are ellipsified.
  • Loading branch information
Zach Lintz authored and jaketrent committed Feb 8, 2018
1 parent 534ed9e commit 8eefb7f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/tag/src/react/index.js
Expand Up @@ -43,8 +43,9 @@ const TagContainer = props => {
textDecoration: 'none',
border: 'none',
overflow: 'hidden',
transition: `background-color ${core.motion
.speedXFast} linear, color ${core.motion.speedXFast} linear`,
transition: `background-color ${core.motion.speedXFast} linear, color ${
core.motion.speedXFast
} linear`,
...(({ href, onClick }) =>
href || onClick
? {
Expand Down Expand Up @@ -134,7 +135,7 @@ Tag.sizes = sizes

Tag.propTypes = {
appearance: PropTypes.oneOf(Object.keys(appearances)),
children: PropTypes.string.isRequired,
children: PropTypes.node.isRequired,
href: PropTypes.string,
icon: PropTypes.element,
isPressed: PropTypes.bool,
Expand Down

0 comments on commit 8eefb7f

Please sign in to comment.