@notiz/formly-tailwindcss
Version:
Formly TailwindCSS theme
25 lines • 3.25 kB
JavaScript
/**
*
* @param fieldConfig
* @param columnClasses default to col-span-1
* @returns
*/
export const formlyTailwindColumn = (fieldConfig, columnClasses = 'col-span-1') => {
return {
className: columnClasses,
...fieldConfig,
};
};
export const formlyTailwindColumnTwo = (fieldConfig) => {
return formlyTailwindColumn(fieldConfig, 'col-span-2');
};
export const formlyTailwindColumnThree = (fieldConfig) => {
return formlyTailwindColumn(fieldConfig, 'col-span-3');
};
export const formlyTailwindColumnSix = (fieldConfig) => {
return formlyTailwindColumn(fieldConfig, 'col-span-6');
};
export const formlyTailwindColumnTwelve = (fieldConfig) => {
return formlyTailwindColumn(fieldConfig, 'col-span-12');
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sdW1uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvZm9ybWx5LXRhaWx3aW5kY3NzL2xheW91dHMvc3JjL2NvbHVtbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQTs7Ozs7R0FLRztBQUNILE1BQU0sQ0FBQyxNQUFNLG9CQUFvQixHQUFHLENBQ2xDLFdBQThCLEVBQzlCLGFBQWEsR0FBRyxZQUFZLEVBQ1QsRUFBRTtJQUNyQixPQUFPO1FBQ0wsU0FBUyxFQUFFLGFBQWE7UUFDeEIsR0FBRyxXQUFXO0tBQ2YsQ0FBQztBQUNKLENBQUMsQ0FBQztBQUVGLE1BQU0sQ0FBQyxNQUFNLHVCQUF1QixHQUFHLENBQ3JDLFdBQThCLEVBQ1gsRUFBRTtJQUNyQixPQUFPLG9CQUFvQixDQUFDLFdBQVcsRUFBRSxZQUFZLENBQUMsQ0FBQztBQUN6RCxDQUFDLENBQUM7QUFFRixNQUFNLENBQUMsTUFBTSx5QkFBeUIsR0FBRyxDQUN2QyxXQUE4QixFQUNYLEVBQUU7S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