receip and ticket and ...
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user