File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export const Modal = ({
2323 withoutMargin = false ,
2424 scrollBehavior = 'outside' ,
2525 fixedButtons = false ,
26+ autoFocus = false ,
2627} : IModal ) : JSX . Element => {
2728 const py = '32px'
2829 const px = '24px'
@@ -40,7 +41,7 @@ export const Modal = ({
4041 motionPreset = "scale"
4142 onClose = { onClose }
4243 scrollBehavior = { isInside ? 'inside' : 'outside' }
43- autoFocus = { false }
44+ autoFocus = { autoFocus }
4445 >
4546 < ModalOverlay />
4647 < ChakraModalContent
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { alertColorStates } from '@/organisms/Alerts/utils/alertStates'
1414import { vars } from '@/theme'
1515
1616export const ModalAlertNew = ( {
17+ autoFocus = false ,
1718 type,
1819 isOpen,
1920 onClose,
@@ -32,7 +33,7 @@ export const ModalAlertNew = ({
3233 motionPreset = "scale"
3334 onClose = { onClose }
3435 closeOnEsc = { type !== 'loading' }
35- autoFocus = { false }
36+ autoFocus = { autoFocus }
3637 >
3738 < ModalOverlay />
3839 < ModalContent
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export interface IModal {
1313 scrollBehavior ?: 'inside' | 'outside'
1414 /** Si esta activo se fija el footer */
1515 fixedButtons ?: boolean
16+ autoFocus ?: boolean
1617}
1718
1819export interface IModalButtons {
@@ -25,6 +26,7 @@ export interface IModalButtons {
2526}
2627
2728export interface IModalAlert {
29+ autoFocus ?: boolean
2830 children ?: React . ReactNode
2931 isOpen : boolean
3032 onClose : ( ) => void
You can’t perform that action at this time.
0 commit comments