aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-12-03 17:54:48 +0800
committerEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-12-03 17:54:48 +0800
commit78703ab370ba829faad2269b76725d1b6001226b (patch)
treecb62131595930997a5be4c59ba86047f3294f245 /packages/website
parent435d9e47e330822a4df2f8e1787e98b60df3bc0f (diff)
downloaddexon-sol-tools-78703ab370ba829faad2269b76725d1b6001226b.tar
dexon-sol-tools-78703ab370ba829faad2269b76725d1b6001226b.tar.gz
dexon-sol-tools-78703ab370ba829faad2269b76725d1b6001226b.tar.bz2
dexon-sol-tools-78703ab370ba829faad2269b76725d1b6001226b.tar.lz
dexon-sol-tools-78703ab370ba829faad2269b76725d1b6001226b.tar.xz
dexon-sol-tools-78703ab370ba829faad2269b76725d1b6001226b.tar.zst
dexon-sol-tools-78703ab370ba829faad2269b76725d1b6001226b.zip
Some comments and cleanup
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/@next/components/container.tsx30
-rw-r--r--packages/website/ts/@next/components/logo.tsx2
-rw-r--r--packages/website/ts/@next/components/text.tsx3
3 files changed, 5 insertions, 30 deletions
diff --git a/packages/website/ts/@next/components/container.tsx b/packages/website/ts/@next/components/container.tsx
deleted file mode 100644
index 58aaa8be9..000000000
--- a/packages/website/ts/@next/components/container.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-interface ContainerProps {
- bgColor?: string;
- removePadding?: boolean;
-}
-
-
-// are we still using this component? (i think not, so we should delete, but have notes)
-// Also, i dont understand why create a styled comp and then make a stateless component that returns the same thing?
-// should be enough to just export a styled component as it is understood that it takes props and a child
-const StyledContainer = styled.div<ContainerProps>`
- background-color: ${props => props.bgColor || 'transparent'};
- max-width: 111.111111111rem; // 2000px
- margin: 0 auto;
- padding: 0 1.666666667rem; // 30px
-
- ${props => props.removePadding && `padding: 0;`}
-`;
-
-export const Container: React.StatelessComponent<ContainerProps> = props => {
- const { children } = props;
-
- return (
- <StyledContainer {...props}>
- {children}
- </StyledContainer>
- );
-};
diff --git a/packages/website/ts/@next/components/logo.tsx b/packages/website/ts/@next/components/logo.tsx
index eade90c68..0b98fcf9d 100644
--- a/packages/website/ts/@next/components/logo.tsx
+++ b/packages/website/ts/@next/components/logo.tsx
@@ -10,6 +10,8 @@ interface LogoInterface {
// Note let's refactor this
+// is it absolutely necessary to have a stateless component
+// to pass props down into the styled icon?
const StyledLogo = styled.div`
text-align: left;
`;
diff --git a/packages/website/ts/@next/components/text.tsx b/packages/website/ts/@next/components/text.tsx
index 9e16c9411..4bc21f0fc 100644
--- a/packages/website/ts/@next/components/text.tsx
+++ b/packages/website/ts/@next/components/text.tsx
@@ -64,6 +64,9 @@ export const Heading: React.StatelessComponent<HeadingProps> = props => {
};
// No need to declare it twice as Styled then rewrap as a stateless comp
+// Note: this would be useful to be implemented the same way was "Heading"
+// and be more generic. e.g. <Text /> with a props asElement so we can use it
+// for literally anything =
export const Paragraph = styled.p<ParagraphProps>`
font-size: ${props => PARAGRAPH_SIZES[props.size || 'default']};
margin-bottom: ${props => !props.noMargin && '30px'};