feat: add profile dialog

This commit is contained in:
Matthew Russell
2024-03-04 14:34:38 +00:00
parent 124adfbc2c
commit 99be8aedbf
4 changed files with 26 additions and 0 deletions
@@ -0,0 +1 @@
export { ProfileDialog } from './profile-dialog';
@@ -0,0 +1,12 @@
import { Dialog } from '@vegaprotocol/ui-toolkit';
import { useProfileDialogStore } from '../../stores/profile-dialog-store';
export const ProfileDialog = () => {
const open = useProfileDialogStore((store) => store.open);
const setOpen = useProfileDialogStore((store) => store.setOpen);
return (
<Dialog open={open} onChange={setOpen}>
<div>Content</div>
</Dialog>
);
};
+2
View File
@@ -8,6 +8,7 @@ import {
} from '@vegaprotocol/web3';
import { WelcomeDialog } from '../components/welcome-dialog';
import { VegaWalletConnectDialog } from '../components/vega-wallet-connect-dialog';
import { ProfileDialog } from '../components/profile-dialog';
const DialogsContainer = () => {
const { isOpen, id, trigger, setOpen } = useAssetDetailsDialogStore();
@@ -24,6 +25,7 @@ const DialogsContainer = () => {
<WelcomeDialog />
<Web3ConnectUncontrolledDialog />
<WithdrawalApprovalDialogContainer />
<ProfileDialog />
</>
);
};
@@ -0,0 +1,11 @@
import { create } from 'zustand';
interface ProfileDialogStore {
open: boolean;
setOpen: (open: boolean) => void;
}
export const useProfileDialogStore = create<ProfileDialogStore>((set) => ({
open: false,
setOpen: (open) => set({ open }),
}));