Skip to content

Commit 815333e

Browse files
jonnybelmontezume
authored andcommitted
fix: LinkButton to use inline TextBody (#627)
* chore: update linkbutton docs with missing inline prop * fix: linkbutton to use span tag * chore: fix prop name
1 parent 6b49e33 commit 815333e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/components/buttons/link-button/link-button.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ const LinkButton = props => (
2222
min-height: initial;
2323
cursor: pointer;
2424
text-decoration: none;
25-
p {
25+
span {
2626
color: ${vars.colorGreen};
2727
${props.isDisabled ? `color: ${vars.colorGray};` : ''}
2828
}
2929
&:hover {
30-
p {
30+
span {
3131
color: ${vars.colorGreen25};
3232
${props.isDisabled ? `color: ${vars.colorGray});` : ''}
3333
}
@@ -50,7 +50,7 @@ const LinkButton = props => (
5050
size: 'medium',
5151
theme: props.isDisabled ? 'grey' : 'green',
5252
})}
53-
<Text.Body>{props.label}</Text.Body>
53+
<Text.Body isInline={true}>{props.label}</Text.Body>
5454
</Spacings.Inline>
5555
</Link>
5656
);

src/components/typography/text/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Wraps the given text in a `<p>` element, for normal content.
9494
| `children` | `PropTypes.node` || - | - |
9595
| `title` | `String` | - | - | - |
9696
| `truncate` | `Bool` | - | - | `false` |
97+
| `isInline` | `Bool` | - | - | `false` |
9798

9899
The component further forwards all `data-` attributes to the underlying component.
99100

@@ -123,6 +124,7 @@ properly style the text.
123124
| `children` | `PropTypes.node` || - | - |
124125
| `title` | `String` | - | - | - |
125126
| `truncate` | `Bool` | - | - | `false` |
127+
| `isInline` | `Bool` | - | - | `false` |
126128

127129
The component further forwards all `data-` attributes to the underlying component.
128130

0 commit comments

Comments
 (0)