From 6bf988942936a8cbb7a42a2fed9b586b16c65029 Mon Sep 17 00:00:00 2001
From: Ezekiel Aquino <ezekiel@bakkenbaeck.no>
Date: Fri, 30 Nov 2018 15:10:52 +0100
Subject: Types return on layout methods

---
 packages/website/ts/@next/components/layout.tsx | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

(limited to 'packages/website/ts/@next/components/layout.tsx')

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;
-- 
cgit 

