Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/organisms/Modals/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const Modal = ({
withoutMargin = false,
scrollBehavior = 'outside',
fixedButtons = false,
autoFocus = false,
}: IModal): JSX.Element => {
const py = '32px'
const px = '24px'
Expand All @@ -40,7 +41,7 @@ export const Modal = ({
motionPreset="scale"
onClose={onClose}
scrollBehavior={isInside ? 'inside' : 'outside'}
autoFocus={false}
autoFocus={autoFocus}
>
<ModalOverlay />
<ChakraModalContent
Expand Down
3 changes: 2 additions & 1 deletion src/organisms/Modals/ModalAlert/ModalAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { alertColorStates } from '@/organisms/Alerts/utils/alertStates'
import { vars } from '@/theme'

export const ModalAlertNew = ({
autoFocus = false,
type,
isOpen,
onClose,
Expand All @@ -32,7 +33,7 @@ export const ModalAlertNew = ({
motionPreset="scale"
onClose={onClose}
closeOnEsc={type !== 'loading'}
autoFocus={false}
autoFocus={autoFocus}
>
<ModalOverlay />
<ModalContent
Expand Down
2 changes: 2 additions & 0 deletions src/organisms/Modals/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface IModal {
scrollBehavior?: 'inside' | 'outside'
/** Si esta activo se fija el footer */
fixedButtons?: boolean
autoFocus?: boolean
}

export interface IModalButtons {
Expand All @@ -25,6 +26,7 @@ export interface IModalButtons {
}

export interface IModalAlert {
autoFocus?: boolean
children?: React.ReactNode
isOpen: boolean
onClose: () => void
Expand Down