kaizen-lib 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ui/Modal.tsx +12 -3
package/package.json
CHANGED
package/src/ui/Modal.tsx
CHANGED
|
@@ -111,11 +111,20 @@ const Descripcion = styled.p`
|
|
|
111
111
|
color: ${fg.muted};
|
|
112
112
|
`;
|
|
113
113
|
|
|
114
|
-
const Body = styled.div<{ $flush: boolean }>`
|
|
114
|
+
const Body = styled.div<{ $flush: boolean; $conFooter: boolean }>`
|
|
115
115
|
flex: 1 1 auto;
|
|
116
116
|
min-height: 0;
|
|
117
117
|
overflow-y: auto;
|
|
118
|
-
padding: ${({ $flush }) =>
|
|
118
|
+
padding: ${({ $flush, $conFooter }) => {
|
|
119
|
+
const arriba = $flush ? space[6] : '0';
|
|
120
|
+
/* Con footer, el aire de abajo lo pone el footer (su propio padding-top);
|
|
121
|
+
duplicarlo acá deja un salto más grande que el de los costados. Sin
|
|
122
|
+
footer, el cuerpo es lo último del panel y necesita el mismo aire que
|
|
123
|
+
los costados — dejarlo en el valor reducido pensado para el otro caso
|
|
124
|
+
deja un borde inferior visiblemente más fino que el resto. */
|
|
125
|
+
const abajo = $conFooter ? space[2] : space[6];
|
|
126
|
+
return `${arriba} ${space[6]} ${abajo}`;
|
|
127
|
+
}};
|
|
119
128
|
`;
|
|
120
129
|
|
|
121
130
|
const Footer = styled.footer`
|
|
@@ -332,7 +341,7 @@ export function Modal({
|
|
|
332
341
|
</Header>
|
|
333
342
|
) : null}
|
|
334
343
|
|
|
335
|
-
<Body $flush={!title}>{children}</Body>
|
|
344
|
+
<Body $flush={!title} $conFooter={Boolean(footer)}>{children}</Body>
|
|
336
345
|
|
|
337
346
|
{footer ? <Footer>{footer}</Footer> : null}
|
|
338
347
|
</Panel>
|