Skip to content

Commit c53c062

Browse files
committed
Fixed button height and width filling parent
1 parent 0a0b918 commit c53c062

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

apps/webapp/app/components/AskAI.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,20 @@ function AskAIProvider({ websiteId, isCollapsed = false }: AskAIProviderProps) {
115115
}}
116116
botProtectionMechanism="hcaptcha"
117117
>
118-
<motion.div
119-
layout="position"
120-
transition={{ duration: 0.2, ease: "easeInOut" }}
121-
className={isCollapsed ? "w-full" : undefined}
122-
>
118+
<motion.div layout="position" transition={{ duration: 0.2, ease: "easeInOut" }}>
123119
<TooltipProvider disableHoverableContent>
124120
<Tooltip>
125121
<TooltipTrigger asChild>
126-
<span className={isCollapsed ? "flex w-full" : "inline-flex"}>
122+
<span className={cn("inline-flex h-8", isCollapsed && "w-full")}>
127123
<Button
128124
variant="small-menu-item"
129125
data-action="ask-ai"
130126
shortcut={{ modifiers: ["mod"], key: "/", enabledOnInputElements: true }}
131127
hideShortcutKey
132128
data-modal-override-open-class-ask-ai="true"
133129
onClick={() => openAskAI()}
134-
className={isCollapsed ? "w-full justify-center" : ""}
130+
fullWidth={isCollapsed}
131+
className={cn("h-full", isCollapsed && "justify-center")}
135132
>
136133
<AISparkleIcon className="size-5" />
137134
</Button>

0 commit comments

Comments
 (0)