blob: fbb9989a497f4afaea7ce6b3a6fd0337a7b9efb5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
import * as React from 'react';
import { colors } from 'ts/style/colors';
export interface IslandProps {
style?: React.CSSProperties;
children?: React.ReactNode;
className?: string;
Component?: string | React.ComponentClass<any> | React.StatelessComponent<any>;
}
const defaultStyle: React.CSSProperties = {
backgroundColor: colors.white,
borderBottomRightRadius: 10,
borderBottomLeftRadius: 10,
borderTopRightRadius: 10,
borderTopLeftRadius: 10,
boxShadow: `0px 3px 4px ${colors.walletBoxShadow}`,
overflow: 'hidden',
};
export const Island: React.StatelessComponent<IslandProps> = (props: IslandProps) => (
<props.Component style={{ ...defaultStyle, ...props.style }} className={props.className}>
{props.children}
</props.Component>
);
Island.defaultProps = {
Component: 'div',
style: {},
};
Island.displayName = 'Island';
|