feat: add custom font sizes to fields (#1376)
Adds custom font sizes to fields https://github.com/user-attachments/assets/1473a4d7-8dc6-4ead-acf5-dd78be7782a0
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
interface DropdownFieldMeta {
|
||||
readOnly?: boolean;
|
||||
required?: boolean;
|
||||
values?: { value: string }[];
|
||||
defaultValue?: string;
|
||||
}
|
||||
import type { TDropdownFieldMeta as DropdownFieldMeta } from '../types/field-meta';
|
||||
|
||||
export const validateDropdownField = (
|
||||
value: string | undefined,
|
||||
fieldMeta: DropdownFieldMeta,
|
||||
isSigningPage: boolean = false,
|
||||
fontSize?: number,
|
||||
): string[] => {
|
||||
const errors = [];
|
||||
|
||||
@@ -50,5 +46,9 @@ export const validateDropdownField = (
|
||||
errors.push('Duplicate values are not allowed');
|
||||
}
|
||||
|
||||
if (fontSize && (fontSize < 8 || fontSize > 96)) {
|
||||
errors.push('Font size must be between 8 and 96.');
|
||||
}
|
||||
|
||||
return errors;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user