aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components/text.tsx
diff options
context:
space:
mode:
authorEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-12-10 19:07:08 +0800
committerEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-12-10 19:07:08 +0800
commit37a1483359d17525db5f4446723c1d9e16385913 (patch)
treeeed28442e5ef255ba77ea31a97d8541944e9e728 /packages/website/ts/@next/components/text.tsx
parent80811c9ccacc646188821b1b31aeaa017e40e9a0 (diff)
downloaddexon-0x-contracts-37a1483359d17525db5f4446723c1d9e16385913.tar.gz
dexon-0x-contracts-37a1483359d17525db5f4446723c1d9e16385913.tar.zst
dexon-0x-contracts-37a1483359d17525db5f4446723c1d9e16385913.zip
Adds withArrow button
Diffstat (limited to 'packages/website/ts/@next/components/text.tsx')
-rw-r--r--packages/website/ts/@next/components/text.tsx16
1 files changed, 12 insertions, 4 deletions
diff --git a/packages/website/ts/@next/components/text.tsx b/packages/website/ts/@next/components/text.tsx
index de31679b2..9058fc7c9 100644
--- a/packages/website/ts/@next/components/text.tsx
+++ b/packages/website/ts/@next/components/text.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import styled from 'styled-components';
-import { getCSSPadding, PaddingInterface } from 'ts/@next/constants/utilities';
+import {getCSSPadding, PaddingInterface} from 'ts/@next/constants/utilities';
interface BaseTextInterface extends PaddingInterface {
size?: 'default' | 'medium' | 'large' | 'small';
@@ -41,11 +41,19 @@ export const Heading: React.StatelessComponent<HeadingProps> = props => {
const {
asElement = 'h1',
children,
- ...style
+ ...style,
} = props;
const Component = StyledHeading.withComponent(asElement);
- return <Component style={{...style}} {...props}>{children}</Component>;
-};
+
+ return (
+ <Component
+ style={{...style}}
+ {...props}
+ >
+ {children}
+ </Component>;
+ )
+}
// 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"