Skip to content

Commit

Permalink
fix: override name prop to be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcdup1 committed Jul 18, 2023
1 parent c6da9ca commit 5731da6
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import { Flex } from '../flex'
import { InlineMessage } from '../inline-message'
import { PasswordField } from '../password-field'
import { PasswordInput } from '../password-input'
import { Override } from '~/utilities'

type ValidationResult = Record<string, boolean>

type CreatePasswordFieldProps = React.ComponentProps<typeof PasswordInput> &
Omit<FieldElementWrapperProps, 'label' | 'name'> & {
type CreatePasswordFieldProps = Override<
React.ComponentProps<typeof PasswordInput> & FieldElementWrapperProps,
{
label?: string
name?: string
validate: (
Expand All @@ -24,6 +26,7 @@ type CreatePasswordFieldProps = React.ComponentProps<typeof PasswordInput> &
defaultValidation: ValidationResult
messageDirection?: CSS['flexDirection']
}
>

export const CreatePasswordField = ({
validate,
Expand Down

0 comments on commit 5731da6

Please sign in to comment.