fix: fix layout issue on mobile browser

This commit is contained in:
2024-08-21 07:05:45 +07:00
parent 4861e1bbb1
commit 7532c6330c
5 changed files with 18 additions and 9 deletions
@@ -13,9 +13,10 @@ import { shareDialog } from "./share-dialog";
type Props = {
prefix?: string;
object: Pick<Object, "objectKey" | "downloadUrl">;
end?: boolean;
};
const ObjectActions = ({ prefix = "", object }: Props) => {
const ObjectActions = ({ prefix = "", object, end }: Props) => {
const { bucketName } = useBucketContext();
const queryClient = useQueryClient();
const isDirectory = object.objectKey.endsWith("/");
@@ -45,12 +46,12 @@ const ObjectActions = ({ prefix = "", object }: Props) => {
<Button icon={DownloadIcon} color="ghost" onClick={onDownload} />
)}
<Dropdown end>
<Dropdown end vertical={end ? "top" : "bottom"}>
<Dropdown.Toggle button={false}>
<Button icon={EllipsisVertical} color="ghost" />
</Dropdown.Toggle>
<Dropdown.Menu className="bg-base-300 gap-y-1">
<Dropdown.Menu className="gap-y-1">
<Dropdown.Item
onClick={() =>
shareDialog.open({ key: object.objectKey, prefix })