fix: add asChild prop for DialogTrigger with Button

This commit is contained in:
2024-12-02 11:52:02 +00:00
parent 3acb85abaf
commit 8a8582e06e
3 changed files with 3 additions and 2 deletions

View File

@@ -167,6 +167,7 @@ function useBaseTemplates() {
"/base-templates",
(): Promise<BaseTemplate[]> =>
fetchApi("/base-templates").then((res) => res.json()),
{ refreshInterval: Number.POSITIVE_INFINITY },
);
}

View File

@@ -225,7 +225,7 @@ function EditorTopBar() {
<Dialog>
<header className="sticky top-0 flex shrink-0 items-center justify-between gap-2 border-b bg-background p-4">
<p className="font-bold">{currentFilePath}</p>
<DialogTrigger>
<DialogTrigger asChild>
<Button>
{isBuildInProgress ? (
<Loader2 className="animate-spin" />

View File

@@ -268,7 +268,7 @@ function DeleteWorkspaceButton({ workspace }: { workspace: Workspace }) {
function WorkspaceInfoButton() {
return (
<Dialog>
<DialogTrigger>
<DialogTrigger asChild>
<Button variant="outline" size="icon">
<Info />
</Button>