import React from 'react'; import ReactDOM from 'react-dom'; import Step from '..'; import { Button, Radio } from '../..'; import { useState } from 'react'; const Step1Content = () => { const [ conditions, setconditions ] = useState([]); const createNewSelectItem = () => { const newType = { type: 'null', fieldName: 'null', }; const newConditions = [ ...conditions, newType ]; setconditions(newConditions); }; return (
{ conditions && conditions.length > 0 && conditions.map((item, index) =>
, ) }
); }; const CreateDemo = () => { const [ direction, setDirection ] = useState<'ver' | 'hoz'>('ver'); const [ shape, setShape ] = useState<'circle' | 'arrow' | 'dot'>('circle'); return (
setDirection(direction as React.SetStateAction<'ver' | 'hoz'>)} > hoz ver setShape(shape as React.SetStateAction<'circle' | 'arrow' | 'dot'>)} > dot circle } />
); }; ReactDOM.render(, document.getElementById('step-demo-2'));