feat(StyledSelect): reexport the <select> component with styled
This commit is contained in:
parent
aacde5a7a5
commit
0828045400
2 changed files with 53 additions and 28 deletions
28
ui/components/common/StyledSelect.tsx
Normal file
28
ui/components/common/StyledSelect.tsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import { cn } from '@/lib/utils';
|
||||
import type { OptionHTMLAttributes, SelectHTMLAttributes } from 'react';
|
||||
|
||||
export interface StyledSelectProps
|
||||
extends SelectHTMLAttributes<HTMLSelectElement> {}
|
||||
|
||||
export const StyledSelect = function StyledSelect({
|
||||
className,
|
||||
...restProps
|
||||
}: StyledSelectProps) {
|
||||
return (
|
||||
<select
|
||||
className={cn(
|
||||
'bg-[#111111] px-3 py-2 flex items-center overflow-hidden border border-[#1C1C1C] text-white rounded-lg text-sm',
|
||||
className,
|
||||
)}
|
||||
{...restProps}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
interface StyledSelectOptionProps extends OptionHTMLAttributes<HTMLOptionElement> {}
|
||||
|
||||
StyledSelect.Option = function StyledSelectOption(
|
||||
props: StyledSelectOptionProps,
|
||||
) {
|
||||
return <option {...props} />;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue