add button to send new account data in dev tools

This commit is contained in:
Ajay Bura 2024-12-22 09:21:29 +05:30
parent 7d4c529c2c
commit d6d22da6b6

View file

@ -107,6 +107,17 @@ function AccountData() {
<Box direction="Column" gap="200"> <Box direction="Column" gap="200">
<Text size="L400">Types</Text> <Text size="L400">Types</Text>
<Box gap="200" wrap="Wrap"> <Box gap="200" wrap="Wrap">
<Chip
variant="Secondary"
fill="Soft"
radii="Pill"
onClick={handleEdit}
before={<Icon size="50" src={Icons.Plus} />}
>
<Text size="T200" truncate>
Add New
</Text>
</Chip>
{accountData.map((mEvent) => ( {accountData.map((mEvent) => (
<Chip <Chip
key={mEvent.getType()} key={mEvent.getType()}
@ -180,7 +191,7 @@ function AccountData() {
</OverlayCenter> </OverlayCenter>
</Overlay> </Overlay>
)} )}
{selectedEvent && selectedOption === 'edit' && ( {selectedOption === 'edit' && (
<Overlay open backdrop={<OverlayBackdrop />}> <Overlay open backdrop={<OverlayBackdrop />}>
<OverlayCenter> <OverlayCenter>
<FocusTrap <FocusTrap
@ -193,8 +204,8 @@ function AccountData() {
> >
<Modal variant="Surface" size="500"> <Modal variant="Surface" size="500">
<AccountDataEditor <AccountDataEditor
type={selectedEvent.getType()} type={selectedEvent?.getType()}
content={selectedEvent.getContent()} content={selectedEvent?.getContent()}
requestClose={handleClose} requestClose={handleClose}
/> />
</Modal> </Modal>