import React , { ReactText } from 'react' ; import { Button } from 'antd' ; import { baseFormDateTpl , baseFormMyRadioTpl , baseFormMyCheckboxTpl , baseFormMySelectTpl , baseFormNumberTpl , baseFormTextAreaTpl , baseFormTextTpl , baseFormUnionType , baseFormTextTipTpl } from '@/components/PanelComponents/FormEditor/types' ; type TBaseForm = { [ key in baseFormUnionType ] : any ; } ; const BaseForm = { Text : ( props ) => { const { label , onChange } = props ; return ( < Button style = { { color : '#fff' , backgroundColor : '#4A4A4A' , borderRadius : '2px' , lineHeight : '0px' , } } onChange = { ( ) => onChange } > { label } < /Button>); } , Textarea : ( props ) => { const { label , onChange } = props ; return ( < Button style = { { color : '#fff' , backgroundColor : '#4A4A4A' } } onChange = { ( ) => onChange } > { label } < /Button>); } , Number : ( props ) => { const { label , onChange } = props ; return ( < Button style = { { color : '#fff' , backgroundColor : '#4A4A4A' } } onChange = { ( ) => onChange } > { label } < /Button>); } , MyRadio : ( props ) => { const { label , onChange } = props ; return ( < Button style = { { color : '#fff' , backgroundColor : '#4A4A4A' } } onChange = { ( ) => onChange } > { label } < /Button>); } , MyCheckbox : ( props ) => { const { label , onChange } = props ; return ( < Button style = { { color : '#fff' , backgroundColor : '#4A4A4A' } } onChange = { ( ) => onChange } > { label } < /Button>); } , Date : ( props ) => { const { label , onChange } = props ; return ( < Button style = { { color : '#fff' , backgroundColor : '#4A4A4A' } } onChange = { ( ) => onChange } > { label } < /Button>); } , MySelect : ( props ) => { const { label , onChange } = props ; return ( < Button style = { { color : '#fff' , backgroundColor : '#4A4A4A' } } onChange = { ( ) => onChange } > { label } < /Button>); } , MyTextTip : ( props ) => { const { label } = props ; return ( < Button style = { { color : '#fff' , backgroundColor : '#4A4A4A' , borderRadius : '2px' , lineHeight : '0px' , } } > { label } < /Button>); } , } ; export default BaseForm ;