Skip to content

Commit 4d7b5c8

Browse files
committed
Fix Button code formatting
1 parent 03df401 commit 4d7b5c8

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

src/components/button/index.tsx

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,17 @@ import TouchableOpacity, {TouchableOpacityProps} from '../touchableOpacity';
1919
import Text, {TextPropTypes} from '../text';
2020
import Image from '../image';
2121

22-
2322
export enum ButtonSize {
2423
xSmall = 'xSmall',
2524
small = 'small',
2625
medium = 'medium',
27-
large = 'large',
26+
large = 'large'
2827
}
2928

3029
export enum AnimationDirection {
3130
center = 'center',
3231
left = 'left',
33-
right = 'right',
32+
right = 'right'
3433
}
3534

3635
export type ButtonPropTypes = TouchableOpacityProps &
@@ -59,8 +58,8 @@ export type ButtonPropTypes = TouchableOpacityProps &
5958
*/
6059
iconOnRight?: boolean;
6160
/**
62-
* whether the icon should flip horizontally on RTL locals
63-
*/
61+
* whether the icon should flip horizontally on RTL locals
62+
*/
6463
supportRTL?: boolean;
6564
/**
6665
* Color of the button background
@@ -322,34 +321,34 @@ class Button extends PureComponent<Props, ButtonState> {
322321
CONTAINER_STYLE_BY_SIZE[Button.sizes.xSmall] = round
323322
? {height: this.state.size, width: this.state.size, padding: PADDINGS.XSMALL}
324323
: {
325-
paddingVertical: PADDINGS.XSMALL,
326-
paddingHorizontal: HORIZONTAL_PADDINGS.XSMALL,
327-
minWidth: MIN_WIDTH.XSMALL
328-
};
324+
paddingVertical: PADDINGS.XSMALL,
325+
paddingHorizontal: HORIZONTAL_PADDINGS.XSMALL,
326+
minWidth: MIN_WIDTH.XSMALL
327+
};
329328
CONTAINER_STYLE_BY_SIZE[Button.sizes.small] = round
330329
? {height: this.state.size, width: this.state.size, padding: PADDINGS.SMALL}
331330
: {
332-
paddingVertical: PADDINGS.SMALL,
333-
paddingHorizontal: HORIZONTAL_PADDINGS.SMALL,
334-
minWidth: MIN_WIDTH.SMALL
335-
};
331+
paddingVertical: PADDINGS.SMALL,
332+
paddingHorizontal: HORIZONTAL_PADDINGS.SMALL,
333+
minWidth: MIN_WIDTH.SMALL
334+
};
336335
CONTAINER_STYLE_BY_SIZE[Button.sizes.medium] = round
337336
? {height: this.state.size, width: this.state.size, padding: PADDINGS.MEDIUM}
338337
: {
339-
paddingVertical: PADDINGS.MEDIUM,
340-
paddingHorizontal: HORIZONTAL_PADDINGS.MEDIUM,
341-
minWidth: MIN_WIDTH.MEDIUM
342-
};
338+
paddingVertical: PADDINGS.MEDIUM,
339+
paddingHorizontal: HORIZONTAL_PADDINGS.MEDIUM,
340+
minWidth: MIN_WIDTH.MEDIUM
341+
};
343342
CONTAINER_STYLE_BY_SIZE[Button.sizes.large] = round
344343
? {height: this.state.size, width: this.state.size, padding: PADDINGS.LARGE}
345344
: {
346-
paddingVertical: PADDINGS.LARGE,
347-
paddingHorizontal: HORIZONTAL_PADDINGS.LARGE,
348-
minWidth: MIN_WIDTH.LARGE
349-
};
345+
paddingVertical: PADDINGS.LARGE,
346+
paddingHorizontal: HORIZONTAL_PADDINGS.LARGE,
347+
minWidth: MIN_WIDTH.LARGE
348+
};
350349

351350
if (outline) {
352-
_.forEach(CONTAINER_STYLE_BY_SIZE, (style) => {
351+
_.forEach(CONTAINER_STYLE_BY_SIZE, style => {
353352
if (round) {
354353
style.padding -= outlineWidth; // eslint-disable-line
355354
} else {
@@ -464,7 +463,7 @@ class Button extends PureComponent<Props, ButtonState> {
464463
if (typeof iconSource === 'function') {
465464
return iconSource(iconStyle);
466465
} else {
467-
return <Image source={iconSource} supportRTL={supportRTL} style={iconStyle}/>;
466+
return <Image source={iconSource} supportRTL={supportRTL} style={iconStyle} />;
468467
}
469468
}
470469
return null;

0 commit comments

Comments
 (0)