feat: invoice customize paper preview

This commit is contained in:
Ahmed Bouhuolia
2024-09-10 13:19:11 +02:00
parent 67904f52af
commit f0dfc3d1b0
11 changed files with 474 additions and 171 deletions

View File

@@ -11,6 +11,7 @@ import {
import { HexColorPicker } from 'react-colorful';
import { useUncontrolled } from '@/hooks/useUncontrolled';
import { Box, BoxProps } from '@/components';
import { sanitizeToHexColor } from '@/utils/sanitize-hex-color';
import styles from './ColorInput.module.scss';
export interface ColorInputProps {
@@ -72,6 +73,10 @@ export function ColorInput({
/>
</Box>
}
onChange={(e) => {
const value = sanitizeToHexColor(e.currentTarget.value);
handleChange(value);
}}
{...inputProps}
className={clsx(styles.field, inputProps?.className)}
/>