Skip to content

Commit 812a17d

Browse files
committed
Use size-* className instead of h-* w-*
1 parent 52cff60 commit 812a17d

File tree

12 files changed

+18
-18
lines changed

12 files changed

+18
-18
lines changed

src/app/[locale]/map/[details]/[id]/loading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default function Loading() {
66
const t = useTranslations();
77
return (
88
<Icons.loading
9-
className="m-auto h-8 w-8 animate-spin text-primary"
9+
className="m-auto size-8 animate-spin text-primary"
1010
role="img"
1111
aria-label={t('site.loading')}
1212
/>

src/components/error-message.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default function ErrorMessage({
1313
return (
1414
<div className="container my-10 grow">
1515
<Alert variant="destructive">
16-
<Icons.alert className="h-4 w-4" />
16+
<Icons.alert className="size-4" />
1717
<AlertTitle className="ml-6">{title}</AlertTitle>
1818
{message && <AlertDescription>{message}</AlertDescription>}
1919
</Alert>

src/components/map/geometry-tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const GeometryTooltip = ({
2727
{properties.attachments?.[0]?.thumbnail && (
2828
<Image
2929
loading="lazy"
30-
className="aspect-[4/3] h-auto w-auto object-cover transition-all group-hover:scale-105"
30+
className="aspect-[4/3] size-auto object-cover transition-all group-hover:scale-105"
3131
src={properties.attachments[0].thumbnail}
3232
alt=""
3333
width="400"

src/components/observation-form.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default function ObservationForm({ jsonSchema, handleSubmit }: Props) {
123123
if (validationMessage?.error === false) {
124124
return (
125125
<Alert variant="default">
126-
<Icons.check className="h-4 w-4" />
126+
<Icons.check className="size-4" />
127127
<AlertTitle className="ml-6">{t('validation.title')}</AlertTitle>
128128
<AlertDescription>{t('validation.content')}</AlertDescription>
129129
</Alert>
@@ -134,7 +134,7 @@ export default function ObservationForm({ jsonSchema, handleSubmit }: Props) {
134134
<Form {...form}>
135135
{validationMessage?.error && (
136136
<Alert variant="destructive">
137-
<Icons.alert className="h-4 w-4" />
137+
<Icons.alert className="size-4" />
138138
<AlertTitle className="ml-6">{t('error.title')}</AlertTitle>
139139
<AlertDescription>{validationMessage.message}</AlertDescription>
140140
</Alert>

src/components/site-header.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function SiteHeader({ menu }: Props) {
2727
<Link href="/" className="flex items-center space-x-2">
2828
{settings && settings.customization.header?.logo?.src ? (
2929
<Image
30-
className="lock hidden h-8 w-8 sm:inline"
30+
className="lock hidden size-8 sm:inline"
3131
width={32}
3232
height={32}
3333
{...settings.customization.header.logo}
@@ -36,7 +36,7 @@ export function SiteHeader({ menu }: Props) {
3636
) : (
3737
<Icons.logo
3838
{...propsForSVGPresentation}
39-
className="lock hidden h-8 w-8 sm:inline"
39+
className="lock hidden size-8 sm:inline"
4040
/>
4141
)}
4242
<span className="font-bold">{t('title')}</span>

src/components/suggestion-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function SuggestionList({
4444
{item.images?.[0]?.thumbnail && (
4545
<CardMedia>
4646
<Carousel
47-
className="aspect-[4/3] h-auto w-auto object-cover transition-all group-hover:scale-105"
47+
className="aspect-[4/3] size-auto object-cover transition-all group-hover:scale-105"
4848
images={convertAttachementsToImages(item.images, true)}
4949
width={400}
5050
height={300}

src/components/ui/accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const AccordionTrigger = React.forwardRef<
3838
{children}
3939
<ChevronDown
4040
{...propsForSVGPresentation}
41-
className="h-4 w-4 transition-transform duration-200"
41+
className="size-4 transition-transform duration-200"
4242
/>
4343
</AccordionPrimitive.Trigger>
4444
</AccordionPrimitive.Header>

src/components/ui/navigation-menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const NavigationMenuTrigger = React.forwardRef<
5757
>
5858
{children}{' '}
5959
<ChevronDown
60-
className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
60+
className="relative top-[1px] ml-1 size-3 transition duration-200 group-data-[state=open]:rotate-180"
6161
aria-hidden="true"
6262
/>
6363
</NavigationMenuPrimitive.Trigger>
@@ -113,7 +113,7 @@ const NavigationMenuIndicator = React.forwardRef<
113113
)}
114114
{...props}
115115
>
116-
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
116+
<div className="relative top-[60%] size-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
117117
</NavigationMenuPrimitive.Indicator>
118118
));
119119
NavigationMenuIndicator.displayName =

src/components/ui/scroll-area.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const ScrollArea = React.forwardRef<
1414
className={cn('relative overflow-hidden', className)}
1515
{...props}
1616
>
17-
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit] pb-20 md:pb-0">
17+
<ScrollAreaPrimitive.Viewport className="size-full rounded-[inherit] pb-20 md:pb-0">
1818
{children}
1919
</ScrollAreaPrimitive.Viewport>
2020
<ScrollBar />

src/components/ui/select.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const SelectTrigger = React.forwardRef<
2626
>
2727
{children}
2828
<SelectPrimitive.Icon asChild>
29-
<ChevronDown className="h-4 w-4 opacity-50" />
29+
<ChevronDown className="size-4 opacity-50" />
3030
</SelectPrimitive.Icon>
3131
</SelectPrimitive.Trigger>
3232
));
@@ -85,9 +85,9 @@ const SelectItem = React.forwardRef<
8585
)}
8686
{...props}
8787
>
88-
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
88+
<span className="absolute left-2 flex size-3.5 items-center justify-center">
8989
<SelectPrimitive.ItemIndicator>
90-
<Check className="h-4 w-4" />
90+
<Check className="size-4" />
9191
</SelectPrimitive.ItemIndicator>
9292
</span>
9393

0 commit comments

Comments
 (0)