Skip to content

Commit e20ccdc

Browse files
NicolappsConvex, Inc.
authored andcommitted
ui: rename wrapsButtonasChild in <Tooltip> (#42161)
GitOrigin-RevId: 09001a25ab2da11e094c3ec90f28e059b37ee576
1 parent 7b0c97b commit e20ccdc

File tree

15 files changed

+20
-20
lines changed

15 files changed

+20
-20
lines changed

npm-packages/@convex-dev/design-system/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@convex-dev/design-system",
3-
"version": "0.2.1",
3+
"version": "0.3.0",
44
"type": "module",
55
"sideEffects": false,
66
"files": [

npm-packages/@convex-dev/design-system/src/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const Button = forwardRef<HTMLElement, ButtonProps>(function Button(
9393
tip={tip}
9494
side={tipSide}
9595
disableHoverableContent={tipDisableHoverableContent}
96-
wrapsButton
96+
asChild
9797
>
9898
<Link
9999
passHref
@@ -119,7 +119,7 @@ export const Button = forwardRef<HTMLElement, ButtonProps>(function Button(
119119
tip={tip}
120120
side={tipSide}
121121
disableHoverableContent={tipDisableHoverableContent}
122-
wrapsButton
122+
asChild
123123
>
124124
{/* we're allowed to use button here. It's the Button component */}
125125
{/* eslint-disable-next-line react/forbid-elements */}

npm-packages/@convex-dev/design-system/src/Tooltip.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function Tooltip({
1111
align = "center",
1212
className,
1313
contentClassName,
14-
wrapsButton = false,
14+
asChild = false,
1515
delayDuration = 0,
1616
maxWidthClassName = "max-w-[16rem]",
1717
disableHoverableContent = false,
@@ -23,7 +23,7 @@ export function Tooltip({
2323
className?: string;
2424
contentClassName?: string;
2525
maxWidthClassName?: string;
26-
wrapsButton?: boolean;
26+
asChild?: boolean;
2727
delayDuration?: number;
2828
disableHoverableContent?: boolean;
2929
}) {
@@ -38,7 +38,7 @@ export function Tooltip({
3838
>
3939
<RadixTooltip.Root>
4040
<RadixTooltip.Trigger
41-
asChild={wrapsButton}
41+
asChild={asChild}
4242
className={classNames(
4343
"focus-visible:outline-0 cursor-default",
4444
className,

npm-packages/dashboard-common/src/elements/Calendar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function Calendar({
7272
return (
7373
<Tooltip
7474
tip={buttonProps["aria-disabled"] === true && beforeStartTooltip}
75-
wrapsButton
75+
asChild
7676
>
7777
{/* eslint-disable-next-line react/forbid-elements, react/button-has-type -- Component managed by react-day-picker */}
7878
<button {...buttonProps}>
@@ -131,7 +131,7 @@ export function Calendar({
131131
? beforeStartTooltip
132132
: undefined
133133
}
134-
wrapsButton
134+
asChild
135135
>
136136
{children}
137137
</Tooltip>

npm-packages/dashboard-common/src/elements/ToggleTheme.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function ThemeRadioInput({
6060
checked={!currentTheme || currentTheme === theme}
6161
hidden
6262
/>
63-
<Tooltip tip={startCase(theme)} wrapsButton>
63+
<Tooltip tip={startCase(theme)} asChild>
6464
<label
6565
aria-label="System Theme"
6666
htmlFor={`${theme}-theme`}

npm-packages/dashboard-common/src/features/data/components/Table/DataCell/DataCell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ function DataCellImpl({
235235
contentClassName="bg-background-secondary animate-fadeInFromLoading"
236236
maxWidthClassName="max-w-[22rem]"
237237
delayDuration={250}
238-
wrapsButton
238+
asChild
239239
>
240240
<Link2Icon className="mr-2 flex-none text-content-secondary" />
241241
</Tooltip>

npm-packages/dashboard-common/src/features/data/components/Table/DataCell/DataCellValue.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const DataCellValue = forwardRef<HTMLSpanElement, DataCellValueProps>(
4141
// but keyboard users can still copy it via clipboard.
4242
// Only render tooltip when hovering because it's slow
4343
isHovered ? (
44-
<Tooltip tip={value} side="bottom" align="start" wrapsButton>
44+
<Tooltip tip={value} side="bottom" align="start" asChild>
4545
<span>{new Date(value).toLocaleString()}</span>
4646
</Tooltip>
4747
) : (

npm-packages/dashboard-common/src/features/data/components/TableTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function TableTab({
4343
}
4444
className="flex w-full items-start gap-0.5"
4545
side="right"
46-
wrapsButton
46+
asChild
4747
>
4848
<Link
4949
href={{

npm-packages/dashboard-common/src/features/files/components/Uploader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export function Uploader({
158158

159159
return (
160160
<div className="flex items-center justify-center gap-2">
161-
<Tooltip wrapsButton tip={cantUploadFilesReason} side="left">
161+
<Tooltip asChild tip={cantUploadFilesReason} side="left">
162162
<label
163163
htmlFor="uploader"
164164
aria-disabled={isUploading || cantUploadFilesReason !== null}

npm-packages/dashboard-common/src/features/functionRunner/components/FunctionTester.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export function GlobalFunctionTester({
218218
key={`close-${isVertical.toString()}`}
219219
side={isVertical ? "bottom" : "top"}
220220
tip="Close panel"
221-
wrapsButton
221+
asChild
222222
>
223223
<ClosePanelButton
224224
onClose={() => hideGlobalRunner("click")}

0 commit comments

Comments
 (0)