modified: components/RegistrationForm.tsx new file: components/UX/SelectNominations.tsx modified: components/UX/index.ts modified: pages/api/loadingLegisteredCommands.ts modified: pages/api/registration.ts modified: pages/registration.tsx modified: posts/regulations.mdx modified: redux/user/types.tsmaster
parent
2a24949485
commit
c254586222
@ -0,0 +1,31 @@ |
||||
import React from 'react'; |
||||
//import { useFormContext } from "react-hook-form";
|
||||
import { useFormContext } from "react-hook-form"; |
||||
|
||||
type Props = { |
||||
text: string; |
||||
name: string; |
||||
children?: JSX.Element[] | JSX.Element; |
||||
} |
||||
|
||||
|
||||
export const SelectNominations: React.FC<Props> = ({text, name}) => { |
||||
const { register } = useFormContext(); |
||||
return( |
||||
<> |
||||
<label htmlFor="country" className="block text-sm font-medium text-gray-700"> |
||||
{text} |
||||
</label> |
||||
<select |
||||
{...register(name)} // ...register("first_partial_class")
|
||||
name={name} |
||||
defaultValue={0} |
||||
className="mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" |
||||
> |
||||
<option value={0}>-- Выбрать --</option> |
||||
<option >Cлалом</option> |
||||
<option >Шорт-Трек</option> |
||||
</select> |
||||
</> |
||||
) |
||||
} |
@ -1,4 +1,5 @@ |
||||
export * from './Select' |
||||
export * from './Alert' |
||||
export * from './Input' |
||||
export * from './Link' |
||||
export * from './Link' |
||||
export * from './SelectNominations' |
Loading…
Reference in new issue