2024-02-02 01:05:45 +01:00
|
|
|
export default function () {
|
2024-06-28 14:04:20 +02:00
|
|
|
function sizeClass(size) {
|
|
|
|
return {
|
|
|
|
sm: 'field-sm',
|
|
|
|
base: 'field-base',
|
|
|
|
lg: 'field-lg',
|
|
|
|
}[size];
|
|
|
|
}
|
2024-02-02 01:05:45 +01:00
|
|
|
|
2024-06-28 13:43:38 +02:00
|
|
|
const fieldHeight = 'group-[.field-base]:h-[35px] group-[.field-sm]:h-[23px]';
|
|
|
|
const fieldAppearance =
|
|
|
|
'group-[.field-base]:border-2 group-[.field-sm]:border border-gray-600 border-solid text-gray-300 bg-gray-700 leading-none rounded-lg group-[.field-base]:text-sm group-[.field-sm]:text-xs';
|
|
|
|
|
|
|
|
const paddingX = 'group-[.field-base]:px-2 group-[.field-sm]:px-1';
|
2024-06-28 14:04:20 +02:00
|
|
|
const paddingY = 'group-[.field-base]:py-2 group-[.field-sm]:py-1';
|
2024-02-02 01:05:45 +01:00
|
|
|
|
|
|
|
return {
|
2024-06-28 13:43:38 +02:00
|
|
|
fieldHeight,
|
|
|
|
fieldAppearance,
|
|
|
|
paddingX,
|
2024-06-28 14:04:20 +02:00
|
|
|
paddingY,
|
|
|
|
sizeClass,
|
2024-02-02 01:05:45 +01:00
|
|
|
};
|
|
|
|
}
|