receip and ticket and ...

This commit is contained in:
hamid zarghami
2024-12-29 16:27:07 +03:30
parent 7756e20a9f
commit 7a5d9d6447
15 changed files with 589 additions and 15 deletions
+10 -1
View File
@@ -1,4 +1,5 @@
import { FC, SelectHTMLAttributes } from 'react'
import { clx } from '../helpers/utils'
export type ItemsSelectType = {
value: string,
@@ -9,12 +10,20 @@ type Props = {
items: ItemsSelectType[],
error_text?: string,
placeholder?: string,
label?: string,
} & SelectHTMLAttributes<HTMLSelectElement>
const Select: FC<Props> = (props: Props) => {
return (
<div className='w-full relative'>
<select {...props} className={`w-full text-black block px-2.5 h-10 text-sm rounded-2.5 bg-gray ${props.className}`}>
<label className='text-sm'>
{props.label}
</label>
<select {...props} className={clx(
'w-full text-black block border-border px-2.5 h-10 text-sm rounded-2.5 bg-gray',
props.className,
props.label && 'mt-1'
)}>
{
props.placeholder &&
<option value="" disabled selected>{props.placeholder}</option>