Skip to content

Commit 5f708a2

Browse files
ErioldDaniel Montoya
andauthored
fix(modal): correction centererd and top position (#626)
Co-authored-by: Daniel Montoya <daniel.montoya@eclass.cl>
1 parent 0229f75 commit 5f708a2

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/documentation/pages/Organisms/ModalAlert.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export interface ModalAlertProps {
2727
title?: string // Titulo del modal
2828
description?: string // Mensaje del modal
2929
optionsButton: optionsButton[] // Boton del modal en array
30+
top?: string // Posición del modal
3031
}
3132
// Propiedades del boton
3233
interface optionsButton {

src/organisms/ModalAlert/ModalAlert.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ export function ModalAlert({
1919
title,
2020
description,
2121
optionsButton,
22+
top,
2223
}: ModalAlertProps): JSX.Element {
2324
const [isDesktop] = useMediaQuery('(min-width: 650px)')
2425

2526
const modalStyles = {
2627
content: {
27-
top: '3.75rem',
28+
top: top,
2829
},
2930
}
3031

3132
const showBorder = optionsButton.length > 1
3233
return (
3334
<Modal
35+
id="modal-alert"
3436
isOpen={showModal}
3537
onClose={() => {}}
3638
closeOnEsc={false}

src/organisms/ModalAlert/types.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ export interface ModalAlertProps {
1313

1414
/** Opciones del boton */
1515
optionsButton: optionsButton[]
16+
17+
/** Posición del modal */
18+
top?: string
1619
}
1720

1821
interface optionsButton {

0 commit comments

Comments
 (0)