From e5fe6b915e760b38a22a8d314fb62364470160eb Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 19 Jun 2018 17:32:01 -0700 Subject: Change Island to use styled-components --- packages/website/ts/components/ui/island.tsx | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'packages/website/ts/components') diff --git a/packages/website/ts/components/ui/island.tsx b/packages/website/ts/components/ui/island.tsx index de90b664f..b88d5fc1b 100644 --- a/packages/website/ts/components/ui/island.tsx +++ b/packages/website/ts/components/ui/island.tsx @@ -1,28 +1,21 @@ import * as React from 'react'; import { colors } from 'ts/style/colors'; +import { styled } from 'ts/style/theme'; export interface IslandProps { style?: React.CSSProperties; - children?: React.ReactNode; className?: string; Component?: string | React.ComponentClass | React.StatelessComponent; } -const defaultStyle: React.CSSProperties = { - backgroundColor: colors.white, - borderBottomRightRadius: 10, - borderBottomLeftRadius: 10, - borderTopRightRadius: 10, - borderTopLeftRadius: 10, - boxShadow: `0px 4px 6px ${colors.walletBoxShadow}`, - overflow: 'hidden', -}; +const PlainIsland: React.StatelessComponent = ({ Component, ...rest }) => ; -export const Island: React.StatelessComponent = (props: IslandProps) => ( - - {props.children} - -); +export const Island = styled(PlainIsland)` + background-color: ${colors.white}; + border-radius: 10px; + box-shadow: 0px 4px 6px ${colors.walletBoxShadow}; + overflow: hidden; +`; Island.defaultProps = { Component: 'div', -- cgit v1.2.3