Add container and button
This commit is contained in:
@@ -1,21 +1,29 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
import { colors } from 'ts/style/colors';
|
||||||
|
|
||||||
export interface ButtonInterface {
|
export interface ButtonInterface {
|
||||||
text: string;
|
text: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const StyledButton = styled.button`
|
const StyledButton = styled.button`
|
||||||
|
appearance: none;
|
||||||
|
border: 0;
|
||||||
|
background-color: ${colors.brandLight};
|
||||||
|
color: ${colors.white};
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
padding: 13px 22px 14px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Text = styled.span`
|
const Text = styled.span`
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
|
font-weight: 500;
|
||||||
line-height: 1.375rem;
|
line-height: 1.375rem;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const Button: React.StatelessComponent<ButtonInterface> = ({ text }) => (
|
export const Button: React.StatelessComponent<ButtonInterface> = ({ text }) => (
|
||||||
<StyledButton>
|
<StyledButton>
|
||||||
<Text>Get Started</Text>
|
<Text>{text}</Text>
|
||||||
</StyledButton>
|
</StyledButton>
|
||||||
);
|
);
|
||||||
|
|||||||
21
packages/website/ts/@next/components/container.tsx
Normal file
21
packages/website/ts/@next/components/container.tsx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
|
interface ContainerProps {
|
||||||
|
}
|
||||||
|
|
||||||
|
const StyledContainer = styled.div`
|
||||||
|
max-width: 117rem; // 2000px
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0 1.764705882rem; // 30px
|
||||||
|
`;
|
||||||
|
|
||||||
|
export const Container: React.StatelessComponent<ContainerProps> = props => {
|
||||||
|
const { children } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<StyledContainer>
|
||||||
|
{children}
|
||||||
|
</StyledContainer>
|
||||||
|
);
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user