aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
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
parentdb1babd5be1b12e94056f48d496c7a6511cecdaa (diff)
downloaddexon-sol-tools-57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986.tar
dexon-sol-tools-57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986.tar.gz
dexon-sol-tools-57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986.tar.bz2
dexon-sol-tools-57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986.tar.lz
dexon-sol-tools-57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986.tar.xz
dexon-sol-tools-57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986.tar.zst
dexon-sol-tools-57e539ed41af9a5a0f8d8e2454c7b45c1b4c2986.zip
Allows margin to be passed variable integers as values, adds comments
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/@next/components/layout.tsx6
-rw-r--r--packages/website/ts/@next/pages/landing.tsx1
2 files changed, 4 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`;
}
diff --git a/packages/website/ts/@next/pages/landing.tsx b/packages/website/ts/@next/pages/landing.tsx
index 2793993f9..98ee034b9 100644
--- a/packages/website/ts/@next/pages/landing.tsx
+++ b/packages/website/ts/@next/pages/landing.tsx
@@ -69,6 +69,7 @@ export const NextLanding = () => (
</Button>
</WrapCentered>
+ {/* Note you can also pass in a string "large/default" or a number for custom margins */}
<Wrap margin={['large', 0, 0, 0]}>
{/* NOTE: this probably should be withComponent as part of a <dl> */}
<Column colWidth="1/3" noPadding>