@@ -5,13 +5,17 @@ import type { InputBaseComponentProps } from "@mui/material/InputBase";
55import Radio from "@mui/material/Radio" ;
66import RadioGroup from "@mui/material/RadioGroup" ;
77import TextField , { type TextFieldProps } from "@mui/material/TextField" ;
8- import Tooltip from "@mui/material/Tooltip" ;
98import type { TemplateVersionParameter } from "api/typesGenerated" ;
109import { Button } from "components/Button/Button" ;
1110import { ExternalImage } from "components/ExternalImage/ExternalImage" ;
1211import { MemoizedMarkdown } from "components/Markdown/Markdown" ;
1312import { Pill } from "components/Pill/Pill" ;
1413import { Stack } from "components/Stack/Stack" ;
14+ import {
15+ Tooltip ,
16+ TooltipContent ,
17+ TooltipTrigger ,
18+ } from "components/Tooltip/Tooltip" ;
1519import { CircleAlertIcon , SettingsIcon } from "lucide-react" ;
1620import { type FC , type ReactNode , useState } from "react" ;
1721import type {
@@ -136,25 +140,41 @@ const ParameterLabel: FC<ParameterLabelProps> = ({ parameter, isPreset }) => {
136140 { displayName }
137141
138142 { ! parameter . required && (
139- < Tooltip title = "If no value is specified, the system will default to the value set by the administrator." >
140- < span css = { styles . optionalLabel } > (optional)</ span >
143+ < Tooltip >
144+ < TooltipTrigger asChild >
145+ < span css = { styles . optionalLabel } > (optional)</ span >
146+ </ TooltipTrigger >
147+ < TooltipContent side = "bottom" className = "max-w-xs" >
148+ If no value is specified, the system will default to the value set
149+ by the administrator.
150+ </ TooltipContent >
141151 </ Tooltip >
142152 ) }
143153 { ! parameter . mutable && (
144- < Tooltip title = "This value cannot be modified after the workspace has been created." >
145- < Pill
146- type = "warning"
147- icon = { < CircleAlertIcon className = "size-icon-xs" /> }
148- >
149- Immutable
150- </ Pill >
154+ < Tooltip >
155+ < TooltipTrigger asChild >
156+ < Pill
157+ type = "warning"
158+ icon = { < CircleAlertIcon className = "size-icon-xs" /> }
159+ >
160+ Immutable
161+ </ Pill >
162+ </ TooltipTrigger >
163+ < TooltipContent side = "bottom" className = "max-w-xs" >
164+ This value cannot be modified after the workspace has been created.
165+ </ TooltipContent >
151166 </ Tooltip >
152167 ) }
153168 { isPreset && (
154- < Tooltip title = "This value was set by a preset" >
155- < Pill type = "info" icon = { < SettingsIcon className = "size-icon-xs" /> } >
156- Preset
157- </ Pill >
169+ < Tooltip >
170+ < TooltipTrigger asChild >
171+ < Pill type = "info" icon = { < SettingsIcon className = "size-icon-xs" /> } >
172+ Preset
173+ </ Pill >
174+ </ TooltipTrigger >
175+ < TooltipContent side = "bottom" >
176+ This value was set by a preset
177+ </ TooltipContent >
158178 </ Tooltip >
159179 ) }
160180 </ span >
@@ -328,14 +348,15 @@ const RichParameterField: FC<RichParameterInputProps> = ({
328348 css = { { padding : small ? undefined : "4px 0" } }
329349 >
330350 { small ? (
331- < Tooltip
332- title = {
351+ < Tooltip >
352+ < TooltipTrigger asChild >
353+ < div > { option . name } </ div >
354+ </ TooltipTrigger >
355+ < TooltipContent side = "bottom" className = "max-w-xs" >
333356 < MemoizedMarkdown >
334357 { option . description }
335358 </ MemoizedMarkdown >
336- }
337- >
338- < div > { option . name } </ div >
359+ </ TooltipContent >
339360 </ Tooltip >
340361 ) : (
341362 < >
0 commit comments