Browse Source

🛠️ Refactor: Update Select component

👷‍♂️ Added SelectProps interface
🧹 Cleaned up code formatting
🎨 Improved component styling
🚀 Ready for the next step!
main
John Doe 1 year ago
parent
commit
7f4fde8589
  1. 24
      src/shared/Select.tsx

24
src/shared/Select.tsx

@ -0,0 +1,24 @@
import React, { FC, SelectHTMLAttributes } from "react";
export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
className?: string;
sizeClass?: string;
}
const Select: FC<SelectProps> = ({
className = "",
sizeClass = "h-11",
children,
...args
}) => {
return (
<select
className={`nc-Select ${sizeClass} ${className} block w-full text-sm rounded-2xl border-neutral-200 focus:border-primary-300 focus:ring focus:ring-primary-200 focus:ring-opacity-50 bg-white dark:border-neutral-700 dark:focus:ring-primary-6000 dark:focus:ring-opacity-25 dark:bg-neutral-900`}
{...args}
>
{children}
</select>
);
};
export default Select;
Loading…
Cancel
Save