-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from remybar/remybar-arguments_ux_improvements
Chore: UX improvements for arguments passing
- Loading branch information
Showing
6 changed files
with
116 additions
and
14 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,43 @@ | ||
import { RiCloseLine } from '@remixicon/react' | ||
|
||
export type ModalProps = { | ||
title: string | ||
visible: boolean | ||
setVisible: (_visible: boolean) => void | ||
children: React.ReactNode | ||
} | ||
|
||
export const Modal = ({ | ||
title, | ||
visible, | ||
setVisible, | ||
children, | ||
}: ModalProps): JSX.Element => { | ||
const closeModal = () => setVisible(false) | ||
|
||
return visible ? ( | ||
<div | ||
className="flex fixed top-0 left-0 z-80 w-screen h-screen bg-gray-800/30 dark:bg-gray-800/50 justify-center items-center" | ||
role="button" | ||
tabIndex={0} | ||
onClick={closeModal} | ||
onKeyDown={closeModal} | ||
> | ||
<div className="fixed inset-0 z-50 overflow-auto bg-black/80 flex"> | ||
<div className="max-w-lg lg:max-w-3xl relative p-4 bg-white w-full m-auto flex-col flex rounded-lg"> | ||
<div className="flex flex-row justify-between pb-2 border-b border-slate-300 mb-4"> | ||
<h2 className="text-sm md:text-md lg:text-lg text-gray-900 dark:text-gray-900 font-semibold"> | ||
{title} | ||
</h2> | ||
<button onClick={closeModal} aria-label="Close modal"> | ||
<RiCloseLine size={24} /> | ||
</button> | ||
</div> | ||
{children} | ||
</div> | ||
</div> | ||
</div> | ||
) : ( | ||
<></> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import { LogType } from '../components/Editor/types' | ||
|
||
declare global { | ||
interface Window { | ||
EvmCodes: any | ||
|