UNPKG

mr-component

Version:
118 lines (115 loc) 2.5 kB
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types'; const MrSwitchCellMeta: IPublicTypeComponentMetadata = { componentName: 'MrSwitchCell', title: 'MrSwitchCell', devMode: 'proCode', npm: { package: 'mr-component', version: '0.0.25', exportName: 'MrSwitchCell', main: 'src/index.tsx', destructuring: true, subName: '', }, configure: { props: [ { title: 'Label', name: 'label', setter: 'StringSetter', defaultValue: '', }, { title: 'Label Font Size', name: 'labelFontSize', setter: 'NumberSetter', }, { title: 'Label Font Weight', name: 'labelFontWeight', setter: 'NumberSetter', }, { title: 'Label Font Color', name: 'labelFontColor', setter: 'ColorSetter', defaultValue: '#323232', }, { title: 'Checked', name: 'checked', setter: 'BoolSetter', }, { title: 'Default Checked', name: 'defaultChecked', setter: 'BoolSetter', }, { title: 'Disabled', name: 'disabled', setter: 'BoolSetter', defaultValue: false, }, { title: 'Active Color', name: 'activeColor', setter: 'ColorSetter', defaultValue: '#2c64e3', }, { title: 'Inactive Color', name: 'inactiveColor', setter: 'ColorSetter', defaultValue: '#9095b5', }, { title: 'Switch Size', name: 'size', setter: 'NumberSetter', defaultValue: 24, }, { title: 'Class Name', name: 'className', setter: 'StringSetter', }, { title: 'Style', name: 'style', setter: 'ObjectSetter', }, { title: 'onChange', name: 'onChange', setter: 'FunctionSetter', }, { title: 'ref', name: 'ref', setter: 'StringSetter', }, { title: 'key', name: 'key', setter: 'StringSetter', }, ], supports: { style: true }, component: {}, }, }; const snippets: IPublicTypeSnippet[] = [ { title: 'MrSwitchCell', screenshot: '', schema: { componentName: 'MrSwitchCell', props: { label: 'Switch Item', checked: false }, }, }, ]; export default { ...MrSwitchCellMeta, snippets, };