UNPKG

@aliretail/react-materials-components

Version:
17 lines (14 loc) 494 B
import { default as RichEditor } from "../../PowerEditor"; import { connect } from '@formily/next'; import { mapStyledProps, mapCustomComponent } from "../shared"; var mapProps = function mapProps(props, fieldProps) { mapStyledProps(props, fieldProps); if (props.readOnly || 'editable' in props && !props.editable) { props.isPreview = true; } }; export var PowerEditor = connect({ getProps: mapProps, getComponent: mapCustomComponent })(RichEditor); export default PowerEditor;