@tomino/dynamic-form-semantic-ui
Version:
Semantic UI form renderer based on dynamic form generation
62 lines • 1.48 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const common_1 = require("../../semantic/tests/common");
const schema = {
type: 'object',
properties: {
value: {
type: 'boolean'
}
}
};
const formDefintion = {
control: 'Stack',
props: {
gap: '12px'
},
elements: [
{
control: 'If',
props: {
value: { source: 'value' },
exists: true
},
elements: [
{
control: 'Text',
props: { text: 'Is TRUE' }
},
{
control: 'Text',
props: { text: 'Is FALSE' }
}
]
},
{
control: 'If',
props: {
value: { source: 'value' },
notExists: true
},
elements: [
{
control: 'Text',
props: { text: 'Is TRUE' }
},
{
control: 'Text',
props: { text: 'Is FALSE' }
}
]
}
]
};
describe('If', () => {
return {
component: common_1.prepareComponent(formDefintion, schema, { value: true }, {
addEditor: true,
showReadOnly: false
})
};
});
//# sourceMappingURL=if.test.js.map