From 5df9d0e51b8e919d1e8f6519292738b5bd8c51c7 Mon Sep 17 00:00:00 2001 From: Sam Nolan Date: Mon, 2 May 2022 21:51:58 +0000 Subject: [PATCH] Pass showTypes and showControls in playground --- .../components/src/components/SquigglePlayground.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/components/src/components/SquigglePlayground.tsx b/packages/components/src/components/SquigglePlayground.tsx index 93e1d963..424cff8d 100644 --- a/packages/components/src/components/SquigglePlayground.tsx +++ b/packages/components/src/components/SquigglePlayground.tsx @@ -43,6 +43,8 @@ function FieldFloat(Props: FieldFloatProps) { interface Props { initialSquiggleString?: string; height?: number; + showTypes?: boolean; + showControls?: boolean; } interface Props2 { @@ -55,10 +57,6 @@ const ShowBox = styled.div` height: ${(props) => props.height}; `; -const MyComponent = styled.div` - color: ${(props) => props.theme.colors.main}; -`; - interface TitleProps { readonly maxHeight: number; } @@ -81,6 +79,8 @@ const Col = styled.div``; let SquigglePlayground: FC = ({ initialSquiggleString = "", height = 300, + showTypes = false, + showControls = false, }: Props) => { let [squiggleString, setSquiggleString] = useState(initialSquiggleString); let [sampleCount, setSampleCount] = useState(1000); @@ -112,6 +112,8 @@ let SquigglePlayground: FC = ({ diagramCount={diagramCount} pointDistLength={pointDistLength} height={150} + showTypes={showTypes} + showControls={showControls} />