feat(modal): mejorar el estilo del modal y ajustar la posición del botón de retroceso

This commit is contained in:
Cesar Mendivil 2025-11-06 11:38:40 -07:00
parent c7a4f163b2
commit a06ffa8f79
3 changed files with 24 additions and 14 deletions

View File

@ -1,8 +1,17 @@
/* NewTransmissionModal - StreamYard style */ /* NewTransmissionModal - StreamYard style */
.modalWrapper {
position: relative;
}
.modalWrapper.hasBackButton :global(.modalHeader) {
padding-left: 56px;
}
.backButton { .backButton {
position: absolute; position: absolute;
top: 16px; top: 50%;
transform: translateY(-50%);
left: 16px; left: 16px;
display: flex; display: flex;
align-items: center; align-items: center;
@ -15,7 +24,7 @@
color: #5f6368; color: #5f6368;
cursor: pointer; cursor: pointer;
transition: all 0.15s; transition: all 0.15s;
z-index: 1; z-index: 10;
} }
.backButton:hover { .backButton:hover {

View File

@ -211,17 +211,18 @@ const NewTransmissionModal: React.FC<Props> = ({ open, onClose, onCreate, onUpda
const showBackButton = view === 'add-destination' const showBackButton = view === 'add-destination'
return ( return (
<Modal <div className={`${styles.modalWrapper} ${showBackButton ? styles.hasBackButton : ''}`}>
open={open} <Modal
onClose={onClose} open={open}
title={modalTitle} onClose={onClose}
width="md" title={modalTitle}
> width="md"
{showBackButton && ( >
<button onClick={handleBackToMain} className={styles.backButton}> {showBackButton && (
<MdArrowBack size={20} /> <button onClick={handleBackToMain} className={styles.backButton}>
</button> <MdArrowBack size={20} />
)} </button>
)}
{view === 'main' && ( {view === 'main' && (
<> <>
@ -474,6 +475,7 @@ const NewTransmissionModal: React.FC<Props> = ({ open, onClose, onCreate, onUpda
</div> </div>
)} )}
</Modal> </Modal>
</div>
) )
} }

View File

@ -39,7 +39,6 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 16px 24px; padding: 16px 24px;
border-bottom: 1px solid #e8eaed;
} }
.modalTitle { .modalTitle {