Skip to content

Commit

Permalink
remove autoFocus
Browse files Browse the repository at this point in the history
  • Loading branch information
rtrembecky committed Nov 10, 2023
1 parent fab58a5 commit f72e6c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/components/Clickable/Clickable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ type ButtonProps = {
onClick?: () => void
disabled?: boolean
children: ReactNode
} & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'autoFocus'>
} & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'type'>

export const Button: FC<ButtonProps> = ({children, onClick, disabled, type, autoFocus}) => {
export const Button: FC<ButtonProps> = ({children, onClick, disabled, type}) => {
return (
<button
onClick={onClick}
className={clsx(styles.actionButton, disabled && styles.disabled)}
disabled={disabled}
type={type}
autoFocus={autoFocus}
>
{children}
</button>
Expand Down
4 changes: 1 addition & 3 deletions src/components/Problems/Discussion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ export const Discussion: FC<DiscussionProps> = ({problemId, problemNumber, close
actions={
<>
<Button onClick={close}>Zavrieť</Button>
<Button onClick={agree} autoFocus>
Potvrdiť
</Button>
<Button onClick={agree}>Potvrdiť</Button>
</>
}
/>
Expand Down

0 comments on commit f72e6c9

Please sign in to comment.