Last active
December 14, 2021 13:14
-
-
Save NikolayGalkin/4bec00191f5f028c0c041746beb0e202 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DetailedHTMLProps, forwardRef, SelectHTMLAttributes } from 'react' | |
export const Select = forwardRef< | |
HTMLSelectElement, | |
DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement> | |
>(({ children, ...rest }, ref) => { | |
return ( | |
<select | |
ref={ref} | |
className="block w-full px-3 py-2 bg-white border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-dodger-blue focus:border-dodger-blue sm:text-sm" | |
{...rest} | |
> | |
{children} | |
</select> | |
) | |
}) | |
Select.displayName = 'Select' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment