Skip to content

Commit

Permalink
feat(web): increase the clickable area of the button (#1406)
Browse files Browse the repository at this point in the history
* docs: update trigger.md

* feat(client-sdk): add taro request support

* feat(web): increase the clickable area of the button

* feat(web): modify css & adjust another copy button
  • Loading branch information
seewhy163 authored Jul 18, 2023
1 parent 85ca268 commit 87ba558
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default function DataPanel() {
return (
<>
<Panel.Header className="my-1 flex-shrink-0">
<div className="flex items-center flex-1">
<div className="flex flex-1 items-center">
<AddDataModal
schema={currentData.data ? currentData.data : {}}
onSuccessSubmit={(id: string, count: number) => {
Expand Down Expand Up @@ -190,7 +190,7 @@ export default function DataPanel() {
refresh(search);
}}
>
<div className="my-4 flex justify-between flex-1">
<div className="my-4 flex flex-1 justify-between">
<HStack spacing={2} className="flex flex-1">
<InputGroup className="mr-4 flex-1">
<InputLeftElement
Expand Down Expand Up @@ -262,20 +262,21 @@ export default function DataPanel() {
const newData = { ...item };
delete newData._id;
return (
<IconWrap
showBg
tooltip={t("Copy").toString()}
size={32}
className="group/icon ml-2 hover:bg-gray-200"
<CopyText
hideToolTip
text={JSON.stringify(newData, null, 2)}
tip={String(t("Copied"))}
className="ml-2 hover:bg-gray-200"
>
<CopyText
hideToolTip
text={JSON.stringify(newData, null, 2)}
tip={String(t("Copied"))}
<IconWrap
showBg
tooltip={t("Copy").toString()}
size={32}
className="group/icon"
>
<CopyIcon />
</CopyText>
</IconWrap>
</IconWrap>
</CopyText>
);
}}
/>
Expand Down
24 changes: 12 additions & 12 deletions web/src/pages/app/database/PolicyDataList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,21 @@ export default function PolicyDataList() {
}}
toolComponent={(item: any) => {
return (
<IconWrap
showBg
tooltip={t("Copy").toString()}
size={32}
className="group/icon ml-2 hover:bg-rose-100"
<CopyText
hideToolTip
text={JSON.stringify(item.value, null, 2)}
tip={String(t("Copied"))}
className="ml-2 hover:bg-gray-200"
>
<CopyText
hideToolTip
text={JSON.stringify(item.value, null, 2)}
tip={String(t("Copied"))}
className="group-hover/icon:text-error-500"
<IconWrap
showBg
tooltip={t("Copy").toString()}
size={32}
className="group/icon"
>
<CopyIcon />
</CopyText>
</IconWrap>
</IconWrap>
</CopyText>
);
}}
/>
Expand Down
3 changes: 2 additions & 1 deletion web/src/pages/app/database/RightComponent/DeleteButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { t } from "i18next";
import IconWrap from "@/components/IconWrap";

export default function DeleteButton(props: { data: any; deleteMethod: any }) {
const { isOpen, onOpen, onClose } = useDisclosure();
const { isOpen, onToggle, onOpen, onClose } = useDisclosure();
return (
<>
<Popover
Expand All @@ -28,6 +28,7 @@ export default function DeleteButton(props: { data: any; deleteMethod: any }) {
tooltip={t("Delete").toString()}
size={32}
onClick={(event: any) => {
onToggle();
event?.stopPropagation();
}}
>
Expand Down

0 comments on commit 87ba558

Please sign in to comment.