-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(front): delete a stack * ui(front): improve some ui element on stack page * refacto(front): generalize modal
- Loading branch information
1 parent
a288a19
commit 8830021
Showing
7 changed files
with
101 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from 'react' | ||
import Button from '../atoms/forms/Button.atom' | ||
|
||
const ModalOrganism = ({ children, toggle, onSubmit, buttonText }: { | ||
children: React.ReactNode | ||
toggle: () => void | ||
onSubmit?: () => void | ||
buttonText?: string | ||
}): JSX.Element => { | ||
return ( | ||
<> | ||
<div | ||
className="justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none" | ||
> | ||
<div className="relative w-96 my-6 mx-auto max-w-3xl"> | ||
{/* content */} | ||
<div className="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none"> | ||
{/* header */} | ||
<div className="flex items-start justify-between p-5 border-b border-solid border-slate-200 rounded-t"> | ||
<h3 className="text-3xl font-semibold"> | ||
Create a new stack | ||
</h3> | ||
</div> | ||
{children} | ||
<div className="flex items-center justify-end p-6 border-t border-solid border-slate-200 rounded-b"> | ||
{ (onSubmit != null) && | ||
<Button | ||
label={buttonText} | ||
onClick={onSubmit} | ||
direction={'right'} | ||
/> | ||
} | ||
|
||
<Button className='btn-ghost ml-4' onClick={toggle} label={'Close'} /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="opacity-25 fixed inset-0 z-40 bg-black"></div> | ||
</> | ||
) | ||
} | ||
|
||
export default ModalOrganism |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters