aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components/layout.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/@next/components/layout.tsx')
-rw-r--r--packages/website/ts/@next/components/layout.tsx12
1 files changed, 4 insertions, 8 deletions
diff --git a/packages/website/ts/@next/components/layout.tsx b/packages/website/ts/@next/components/layout.tsx
index 4621d1e8e..a9e95f13c 100644
--- a/packages/website/ts/@next/components/layout.tsx
+++ b/packages/website/ts/@next/components/layout.tsx
@@ -42,23 +42,19 @@ interface GetColWidthArgs {
columns: number;
}
-const _getColumnWidth = (args: GetColWidthArgs) => {
+const _getColumnWidth = (args: GetColWidthArgs): string => {
const { span = 1, columns } = args;
const percentWidth = (span / columns) * 100;
const gutterDiff = (GUTTER * (columns - 1)) / columns;
return `calc(${percentWidth}% - ${gutterDiff}px)`;
};
-const _getPadding = (value: number | (string | number)[]) => {
- let padding: string = '';
-
+const _getPadding = (value: number | (string | number)[]): string => {
if (Array.isArray(value)) {
- padding = value.map(val => PADDING_SIZES[val] || `${val}px`).join(' ');
+ return value.map(val => PADDING_SIZES[val] || `${val}px`).join(' ');
} else {
- padding = `${value}px`;
+ return `${value}px`;
}
-
- return padding;
}
const GUTTER = 30 as number;