Skip to content

Commit c1a51fb

Browse files
authored
Refactoring (#32)
1 parent 9b74b22 commit c1a51fb

File tree

8 files changed

+8
-14
lines changed

8 files changed

+8
-14
lines changed

src/column/renderAlignSelf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default (alignSelf?: ColumnAlignSelf): string => {
1212

1313
if (allowedValues.includes(alignSelf!)) {
1414
return css`
15-
align-self: ${alignSelf + ""} !important;
15+
align-self: ${alignSelf!} !important;
1616
`;
1717
} else {
1818
return "";

src/column/renderOffset.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ export default (offset?: ColumnOffset): string => {
88
offset > 0 &&
99
offset < 12
1010
) {
11-
return `
12-
margin-left: ${percentage(offset)}%;
13-
`;
11+
return `margin-left: ${percentage(offset)}%;`;
1412
}
1513

1614
return "";

src/column/renderOrder.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ const renderOrder = (order?: ColumnOrder | 0 | 13): string => {
1111
}
1212

1313
if (typeof order === "number") {
14-
return `
15-
order: ${order - 1};
16-
`;
14+
return `order: ${order - 1};`;
1715
}
1816
}
1917

src/container/renderWidth.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
export default (width?: number): string => {
22
if (width != null && typeof width === "number") {
3-
return `
4-
max-width: ${width}px;
5-
`;
3+
return `max-width: ${width}px;`;
64
}
75

86
return "";

src/row/renderAlignContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default (alignContent?: RowAlignContent): string => {
1313

1414
if (allowedValues.includes(alignContent!)) {
1515
return css`
16-
align-content: ${alignContent + ""} !important;
16+
align-content: ${alignContent!} !important;
1717
`;
1818
} else {
1919
return "";

src/row/renderAlignItems.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default (alignItems?: RowAlignItems): string => {
1212

1313
if (allowedValues.includes(alignItems!)) {
1414
return css`
15-
align-items: ${alignItems + ""} !important;
15+
align-items: ${alignItems!} !important;
1616
`;
1717
} else {
1818
return "";

src/row/renderDirection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default (direction?: RowDirection): string => {
66

77
if (allowedValues.includes(direction!)) {
88
return css`
9-
flex-direction: ${direction + ""} !important;
9+
flex-direction: ${direction!} !important;
1010
`;
1111
} else {
1212
return "";

src/row/renderJustifyContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default (contentJustify?: RowJustifyContent): string => {
1212

1313
if (allowedValues.includes(contentJustify!)) {
1414
return css`
15-
justify-content: ${contentJustify + ""} !important;
15+
justify-content: ${contentJustify!} !important;
1616
`;
1717
} else {
1818
return "";

0 commit comments

Comments
 (0)