@tsed/schema-formio
Version:
Transform Ts.ED Schema & JsonSchema to a valid Formio schema
20 lines (19 loc) • 398 B
text/typescript
import {Component} from "./component.js";
/**
* Configure the property as Currency component.
* @decorator
* @formio
* @property
* @schema
*/
export function Currency(props: Record<string, any> = {}): PropertyDecorator {
return Component({
currency: "USD",
inputFormat: "plain",
mask: false,
spellcheck: true,
delimiter: true,
...props,
type: "currency"
});
}