From 7de33c5dd9842ef0e83eac64c6e42c69608e4ad0 Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 1 Nov 2018 16:52:31 -0700 Subject: feat: implement panel title and close --- packages/instant/src/components/sliding_panel.tsx | 20 +++++++++++++++----- .../src/components/zero_ex_instant_container.tsx | 1 + 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'packages/instant') diff --git a/packages/instant/src/components/sliding_panel.tsx b/packages/instant/src/components/sliding_panel.tsx index e83cf0fb5..678a60cea 100644 --- a/packages/instant/src/components/sliding_panel.tsx +++ b/packages/instant/src/components/sliding_panel.tsx @@ -5,16 +5,26 @@ import { zIndex } from '../style/z_index'; import { PositionAnimationSettings } from './animations/position_animation'; import { SlideAnimation, SlideAnimationState } from './animations/slide_animation'; -import { Container, Icon } from './ui'; +import { Container, Flex, Icon, Text } from './ui'; export interface PanelProps { + title?: string; onClose?: () => void; } -export const Panel: React.StatelessComponent = ({ children, onClose }) => ( - - - {children} +export const Panel: React.StatelessComponent = ({ title, children, onClose }) => ( + + + {title && ( + + + {title} + + + )} + + + {children} ); diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 850beb49c..f734dcbd7 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -43,6 +43,7 @@ export class ZeroExInstantContainer extends React.Component -- cgit v1.2.3