Skip to content

Commit

Permalink
Update text rendering for both icon & text
Browse files Browse the repository at this point in the history
- Show text if specified regardless of icon, allows for icon & text

- Switch text rendering, don't need a span tag, just use a fragment
  • Loading branch information
mkaz committed Oct 28, 2020
1 parent ea7d64a commit aafd939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/src/button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export function Button( props, ref ) {
ref={ ref }
>
{ icon && <Icon icon={ icon } size={ iconSize } /> }
{ ! icon && text && <span>{ text }</span> }
{ text && <>{ text }</> }
{ children }
</Tag>
);
Expand Down

0 comments on commit aafd939

Please sign in to comment.