Skip to content

Commit 6380907

Browse files
Add border radius to UI elements
Apply border radius to all blocks, modals, and buttons for a consistent look.
1 parent a07bd13 commit 6380907

5 files changed

Lines changed: 12 additions & 11 deletions

File tree

src/components/CookieBanner.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const CookieBanner = () => {
1616
return (
1717
<>
1818
<div className="fixed bottom-0 left-0 right-0 z-50 p-4 bg-black/50 backdrop-blur-sm">
19-
<Card className="max-w-4xl mx-auto p-6 bg-white shadow-xl border border-slate-200">
19+
<Card className="max-w-4xl mx-auto p-6 bg-white shadow-xl border border-slate-200 rounded-2xl">
2020
<div className="flex flex-col lg:flex-row gap-4 items-start lg:items-center">
2121
<div className="flex items-start gap-3 flex-1">
2222
<Cookie className="h-6 w-6 text-blue-600 flex-shrink-0 mt-1" />
@@ -45,7 +45,7 @@ export const CookieBanner = () => {
4545
variant="outline"
4646
size="sm"
4747
onClick={() => setShowPreferences(true)}
48-
className="flex items-center gap-2"
48+
className="flex items-center gap-2 rounded-xl"
4949
>
5050
<Settings className="h-4 w-4" />
5151
Personnaliser
@@ -54,13 +54,14 @@ export const CookieBanner = () => {
5454
variant="outline"
5555
size="sm"
5656
onClick={acceptNecessaryOnly}
57+
className="rounded-xl"
5758
>
5859
Nécessaires uniquement
5960
</Button>
6061
<Button
6162
size="sm"
6263
onClick={acceptAll}
63-
className="bg-blue-600 hover:bg-blue-700 text-white"
64+
className="bg-blue-600 hover:bg-blue-700 text-white rounded-xl"
6465
>
6566
Accepter tout
6667
</Button>

src/components/ui/alert-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const AlertDialogContent = React.forwardRef<
3434
<AlertDialogPrimitive.Content
3535
ref={ref}
3636
className={cn(
37-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
37+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-2xl",
3838
className
3939
)}
4040
{...props}

src/components/ui/button.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
12
import * as React from "react"
23
import { Slot } from "@radix-ui/react-slot"
34
import { cva, type VariantProps } from "class-variance-authority"
45

56
import { cn } from "@/lib/utils"
67

78
const buttonVariants = cva(
8-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
9+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
910
{
1011
variants: {
1112
variant: {
@@ -21,8 +22,8 @@ const buttonVariants = cva(
2122
},
2223
size: {
2324
default: "h-10 px-4 py-2",
24-
sm: "h-9 rounded-md px-3",
25-
lg: "h-11 rounded-md px-8",
25+
sm: "h-9 rounded-lg px-3",
26+
lg: "h-11 rounded-xl px-8",
2627
icon: "h-10 w-10",
2728
},
2829
},

src/components/ui/card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Card = React.forwardRef<
1010
<div
1111
ref={ref}
1212
className={cn(
13-
"rounded-lg border bg-card text-card-foreground shadow-sm",
13+
"rounded-xl border bg-card text-card-foreground shadow-sm",
1414
className
1515
)}
1616
{...props}

src/components/ui/dialog.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import * as React from "react"
32
import * as DialogPrimitive from "@radix-ui/react-dialog"
43
import { X } from "lucide-react"
@@ -37,13 +36,13 @@ const DialogContent = React.forwardRef<
3736
<DialogPrimitive.Content
3837
ref={ref}
3938
className={cn(
40-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
39+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-2xl",
4140
className
4241
)}
4342
{...props}
4443
>
4544
{children}
46-
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
45+
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-lg opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
4746
<X className="h-4 w-4" />
4847
<span className="sr-only">Close</span>
4948
</DialogPrimitive.Close>

0 commit comments

Comments
 (0)