1234567891011121314151617 |
- import Library from 'trapilib/dist/lib';
- import Editors from './index.js';
- let Types = Library.DataTypes.Types;
- export default function(Type) {
- switch(Type.type) {
- case Types.Text:
- if(Type.isColor)
- return Editors.ColorEditor;
- return Editors.TextEditor;
- case Types.Number:
- return Editors.Numbers;
- default:
- return Editors.TextEditor;
- }
- }
|