@tsed/schema-formio
Version:
Transform Ts.ED Schema & JsonSchema to a valid Formio schema
19 lines (17 loc) • 399 B
text/typescript
import {JsonEntityFn, JsonEntityStore} from "@tsed/schema";
import {camelCase} from "change-case";
/**
* Group the current property in tabs components.
* @decorator
* @formio
* @property
* @schema
*/
export function Tabs(label: string) {
return JsonEntityFn((store: JsonEntityStore) => {
store.schema.customKey("x-formiotabs", {
key: camelCase(label),
label
});
});
}