Skip to content

Commit c4e0de5

Browse files
authored
Button - link - adjust spacing (#2930)
1 parent ea2319b commit c4e0de5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/button/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,16 @@ class Button extends PureComponent<Props, ButtonState> {
250250
}
251251

252252
getIconStyle() {
253-
const {disabled, iconStyle: propsIconStyle, iconOnRight, size: propsSize} = this.props;
253+
const {disabled, iconStyle: propsIconStyle, iconOnRight, size: propsSize, link} = this.props;
254254
const size = propsSize || DEFAULT_SIZE;
255255
const iconStyle: ImageStyle = {
256256
tintColor: this.getLabelColor()
257257
};
258-
const marginSide = ([Button.sizes.large, Button.sizes.medium] as ButtonSizeProp[]).includes(size) ? 8 : 4;
258+
const marginSide = link
259+
? 4
260+
: ([Button.sizes.large, Button.sizes.medium] as ButtonSizeProp[]).includes(size)
261+
? 8
262+
: 4;
259263

260264
if (!this.isIconButton) {
261265
if (iconOnRight) {

0 commit comments

Comments
 (0)