aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components
diff options
context:
space:
mode:
authorEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-11-30 22:07:42 +0800
committerEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-11-30 22:07:42 +0800
commit57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986 (patch)
treeea0723faad731f16fd8104168e3f93a5696ee268 /packages/website/ts/@next/components
parentdb1babd5be1b12e94056f48d496c7a6511cecdaa (diff)
downloaddexon-0x-contracts-57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986.tar.gz
dexon-0x-contracts-57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986.tar.zst
dexon-0x-contracts-57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986.zip
Allows margin to be passed variable integers as values, adds comments
Diffstat (limited to 'packages/website/ts/@next/components')
-rw-r--r--packages/website/ts/@next/components/layout.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/website/ts/@next/components/layout.tsx b/packages/website/ts/@next/components/layout.tsx
index 47d9173c3..4621d1e8e 100644
--- a/packages/website/ts/@next/components/layout.tsx
+++ b/packages/website/ts/@next/components/layout.tsx
@@ -27,7 +27,7 @@ interface SectionProps {
interface WrapProps {
width?: 'default' | 'full' | 'medium' | 'narrow';
bgColor?: string;
- margin?: number | (string | number)[];
+ margin?: number | ('large' | 'default' | number)[];
}
interface ColumnProps {
@@ -50,10 +50,10 @@ const _getColumnWidth = (args: GetColWidthArgs) => {
};
const _getPadding = (value: number | (string | number)[]) => {
- let padding = '';
+ let padding: string = '';
if (Array.isArray(value)) {
- padding = value.map(val => PADDING_SIZES[val] || '0px').join(' ');
+ padding = value.map(val => PADDING_SIZES[val] || `${val}px`).join(' ');
} else {
padding = `${value}px`;
}