aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components
diff options
context:
space:
mode:
authorFred Carlsen <fred@sjelfull.no>2018-12-15 03:20:27 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-15 03:20:27 +0800
commitceddc019853632f54dd803f5673e8688d38246ee (patch)
treedc051b66a060ecd141d64634ac060cbf3fedad40 /packages/website/ts/@next/components
parent1955c846f27ee5830bfbff201237dae6dcc99e5d (diff)
downloaddexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar
dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar.gz
dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar.bz2
dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar.lz
dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar.xz
dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.tar.zst
dexon-sol-tools-ceddc019853632f54dd803f5673e8688d38246ee.zip
Type fixes
Diffstat (limited to 'packages/website/ts/@next/components')
-rw-r--r--packages/website/ts/@next/components/hero.tsx2
-rw-r--r--packages/website/ts/@next/components/mobileNav.tsx6
-rw-r--r--packages/website/ts/@next/components/newLayout.tsx1
-rw-r--r--packages/website/ts/@next/components/text.tsx4
4 files changed, 7 insertions, 6 deletions
diff --git a/packages/website/ts/@next/components/hero.tsx b/packages/website/ts/@next/components/hero.tsx
index cb17071fc..46e2ca6d9 100644
--- a/packages/website/ts/@next/components/hero.tsx
+++ b/packages/website/ts/@next/components/hero.tsx
@@ -13,7 +13,7 @@ interface Props {
}
export const Hero = (props: Props) => (
- <Section maxWidth="1170px">
+ <Section>
<Wrap isCentered={!props.figure} isFullWidth={props.isFullWidth}>
{props.figure &&
<Content width="400px">
diff --git a/packages/website/ts/@next/components/mobileNav.tsx b/packages/website/ts/@next/components/mobileNav.tsx
index 4ae604c3f..2b8c10ea6 100644
--- a/packages/website/ts/@next/components/mobileNav.tsx
+++ b/packages/website/ts/@next/components/mobileNav.tsx
@@ -4,7 +4,7 @@ import styled from 'styled-components';
import {Link} from 'react-router-dom';
-import {WrapGrid} from 'ts/@next/components/newLayout';
+import {WrapGrid, WrapProps} from 'ts/@next/components/newLayout';
interface Props {
isToggled: boolean;
@@ -36,7 +36,7 @@ export class MobileNav extends React.PureComponent<Props> {
</Section>
<Section isDark={true}>
- <Grid as="ul" width="100%" isWrapped={true}>
+ <Grid as="ul" isFullWidth={true} isWrapped={true}>
<li>
<Link to="/next/why">
Why 0x
@@ -112,7 +112,7 @@ const Section = styled.div<{ isDark?: boolean }>`
background-color: ${props => props.isDark && props.theme.mobileNavBgLower};
`;
-const Grid = styled(WrapGrid)`
+const Grid = styled(WrapGrid)<WrapProps>`
li {
width: 50%;
flex-shrink: 0;
diff --git a/packages/website/ts/@next/components/newLayout.tsx b/packages/website/ts/@next/components/newLayout.tsx
index 3285ff877..7b89e7420 100644
--- a/packages/website/ts/@next/components/newLayout.tsx
+++ b/packages/website/ts/@next/components/newLayout.tsx
@@ -25,6 +25,7 @@ export interface SectionProps extends WrapProps {
isPadded?: boolean;
isFullWidth?: boolean;
isFlex?: boolean;
+ padding?: string;
paddingMobile?: string;
flexBreakpoint?: string;
maxWidth?: string;
diff --git a/packages/website/ts/@next/components/text.tsx b/packages/website/ts/@next/components/text.tsx
index eb20c16e6..7236a5a37 100644
--- a/packages/website/ts/@next/components/text.tsx
+++ b/packages/website/ts/@next/components/text.tsx
@@ -33,7 +33,7 @@ const StyledHeading = styled.h1<HeadingProps>`
display: ${props => props.isFlex && `inline-flex`};
align-items: center;
justify-content: ${props => props.isFlex && `space-between`};
- font-size: ${props => isNaN(props.size) ? `var(--${props.size || 'default'}Heading)` : `${props.size}px`};
+ font-size: ${props => typeof props.size === 'string' ? `var(--${props.size || 'default'}Heading)` : `${props.size}px`};
line-height: ${props => `var(--${props.size || 'default'}HeadingHeight)`};
text-align: ${props => props.isCentered && 'center'};
padding: ${props => props.padding && getCSSPadding(props.padding)};
@@ -49,7 +49,7 @@ export const Heading: React.StatelessComponent<HeadingProps> = props => {
const {
asElement = 'h1',
children,
- ...style,
+ ...style
} = props;
const Component = StyledHeading.withComponent(asElement);