diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/website/ts/@next/components/layout.tsx | 12 |
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; |