mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-30 09:36:42 +10:00
Refactor Modal to use flexbox
This commit is contained in:
parent
4db5f31e84
commit
d12330d3a7
5 changed files with 85 additions and 64 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/* Content is visible as modal layer */
|
||||
.isOpen {
|
||||
display: block;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
|
|
@ -58,3 +59,9 @@
|
|||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,9 @@ export class ModalComponent extends Component {
|
|||
return (
|
||||
<div className={classes}>
|
||||
{header}
|
||||
{children}
|
||||
<div className={css.content}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
exports[`Modal no extra classes when window is missing 1`] = `
|
||||
<div
|
||||
className="test-class-from-props">
|
||||
Content
|
||||
<div
|
||||
className={undefined}>
|
||||
Content
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
exports[`ModalInMobile no extra classes when window is missing 1`] = `
|
||||
<div
|
||||
className="test-class-from-props">
|
||||
Content
|
||||
<div
|
||||
className={undefined}>
|
||||
Content
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
|
|
|||
|
|
@ -46,36 +46,39 @@ exports[`InboxPage matches snapshot 1`] = `
|
|||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/signup"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
Sign up
|
||||
</span>
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/login"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
Log in
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/l/new"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
+ Add your sauna
|
||||
</span>
|
||||
</a>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/signup"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
Sign up
|
||||
</span>
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/login"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
Log in
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/l/new"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
+ Add your sauna
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -230,36 +233,39 @@ exports[`InboxPage matches snapshot 2`] = `
|
|||
className={undefined}>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/signup"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
Sign up
|
||||
</span>
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/login"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
Log in
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/l/new"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
+ Add your sauna
|
||||
</span>
|
||||
</a>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/signup"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
Sign up
|
||||
</span>
|
||||
</a>
|
||||
<a
|
||||
className=""
|
||||
href="/login"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
Log in
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
className={undefined}>
|
||||
<a
|
||||
className=""
|
||||
href="/l/new"
|
||||
onClick={[Function]}
|
||||
style={Object {}}>
|
||||
<span>
|
||||
+ Add your sauna
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue