diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-30 08:02:46 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-30 08:02:46 +0800 |
commit | 475698ed92dc6310591ec9d0653eaa931d7e03f6 (patch) | |
tree | 1698fb00bafe6a4a9fb4d88bbbdfc1f4d102b055 /packages/instant/src/components/panel.tsx | |
parent | 48ff13e3e22bf9f71bc1a367f86aaa0ae89989ae (diff) | |
download | dexon-sol-tools-475698ed92dc6310591ec9d0653eaa931d7e03f6.tar dexon-sol-tools-475698ed92dc6310591ec9d0653eaa931d7e03f6.tar.gz dexon-sol-tools-475698ed92dc6310591ec9d0653eaa931d7e03f6.tar.bz2 dexon-sol-tools-475698ed92dc6310591ec9d0653eaa931d7e03f6.tar.lz dexon-sol-tools-475698ed92dc6310591ec9d0653eaa931d7e03f6.tar.xz dexon-sol-tools-475698ed92dc6310591ec9d0653eaa931d7e03f6.tar.zst dexon-sol-tools-475698ed92dc6310591ec9d0653eaa931d7e03f6.zip |
feat: add basic panel component and other small improvements
Diffstat (limited to 'packages/instant/src/components/panel.tsx')
-rw-r--r-- | packages/instant/src/components/panel.tsx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/packages/instant/src/components/panel.tsx b/packages/instant/src/components/panel.tsx new file mode 100644 index 000000000..bb16ed9b1 --- /dev/null +++ b/packages/instant/src/components/panel.tsx @@ -0,0 +1,27 @@ +import * as React from 'react'; + +import { ColorOption } from '../style/theme'; +import { zIndex } from '../style/z_index'; + +import { Button, Container, Text } from './ui'; + +export interface PanelProps { + onClose?: () => void; +} + +export const Panel: React.StatelessComponent<PanelProps> = ({ children, onClose }) => ( + <Container + backgroundColor={ColorOption.white} + position="absolute" + top="0px" + left="0px" + width="100%" + height="100%" + zIndex={zIndex.panel} + > + <Button onClick={onClose}> + <Text fontColor={ColorOption.white}>Close </Text> + </Button> + {children} + </Container> +); |