Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit af3f28b

Browse files
committed
Add shadow variation to card story and update tailwindcss configs
Added a new variation to the card story with shadow implementation. Also expanded border radius and box shadow configurations in the tailwind.config.ts file. Additionally, comments for height, maxHeight, and minHeight properties were updated, indicating these changes are allowed for now. Increased tailwindcss package version due to these updates.
1 parent c4b5454 commit af3f28b

File tree

4 files changed

+77
-11
lines changed

4 files changed

+77
-11
lines changed

apps/docs/src/stories/card/card.stories.tsx

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,51 @@ export const WithForm: Story = {
139139
</Card>
140140
),
141141
};
142+
143+
// With Shadow
144+
export const WithShadow: Story = {
145+
args: {
146+
className: 'max-w-md shadow-box-md',
147+
},
148+
render: (args) => (
149+
<Card {...args}>
150+
<CardHeader>
151+
<CardTitle>Notifications</CardTitle>
152+
<CardDescription>You have 3 unread messages.</CardDescription>
153+
</CardHeader>
154+
<CardContent className="grid gap-6">
155+
<div className="flex items-center space-x-4 rounded-md border p-4">
156+
<BellIcon size={16} />
157+
<div className="flex-1 space-y-1">
158+
<p className="text-sm font-medium">Push Notifications</p>
159+
<p className="text-muted-foreground text-sm">
160+
Send notifications to device.
161+
</p>
162+
</div>
163+
<Switch />
164+
</div>
165+
<div>
166+
{notifications.map((notification) => (
167+
<div
168+
className="mb-2 grid grid-cols-[25px_1fr] items-start pb-2 last:mb-0 last:pb-0"
169+
key={notification.title}
170+
>
171+
<span className="flex h-2 w-2 translate-y-1 rounded-full bg-sky-500" />
172+
<div className="space-y-1">
173+
<p className="text-sm font-medium">{notification.title}</p>
174+
<p className="text-muted-foreground text-sm">
175+
{notification.description}
176+
</p>
177+
</div>
178+
</div>
179+
))}
180+
</div>
181+
</CardContent>
182+
<CardFooter>
183+
<Button className="w-full" startIcon={<CheckIcon />}>
184+
Mark all as read
185+
</Button>
186+
</CardFooter>
187+
</Card>
188+
),
189+
};

packages/tailwindcss/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @codefixlabs/tailwindcss
22

3+
## 0.1.35
4+
5+
### Patch Changes
6+
7+
- Expand border radius and box shadow configurations
8+
39
## 0.1.34
410

511
### Patch Changes

packages/tailwindcss/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codefixlabs/tailwindcss",
3-
"version": "0.1.34",
3+
"version": "0.1.35",
44
"license": "MIT",
55
"sideEffects": false,
66
"exports": {

packages/tailwindcss/src/tailwind.config.ts

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,29 @@ export const sharedConfig: Config = {
100100
DEFAULT: 'hsl(var(--ui-border))',
101101
},
102102
borderRadius: {
103+
inherit: 'inherit',
104+
sm: 'calc(var(--ui-radius) - 0.375rem)',
105+
DEFAULT: 'calc(var(--ui-radius) - 0.25rem)',
106+
md: 'calc(var(--ui-radius) - 0.125rem)',
107+
lg: 'var(--ui-radius)',
108+
xl: 'calc(var(--ui-radius) + 0.25rem)',
103109
'2xl': 'calc(var(--ui-radius) + 0.5rem)',
104-
'3xl': 'calc(var(--ui-radius) + 1rem)' /* 2px */,
105-
DEFAULT: 'calc(var(--ui-radius) - 0.25rem)' /* 4px */,
106-
inherit: 'inherit' /* 6px */,
107-
lg: 'var(--ui-radius)' /* 8px */,
108-
md: 'calc(var(--ui-radius) - 0.125rem)' /* 12px */,
109-
sm: 'calc(var(--ui-radius) - 0.375rem)' /* 16px */,
110-
xl: 'calc(var(--ui-radius) + 0.25rem)' /* 24px */,
110+
'3xl': 'calc(var(--ui-radius) + 1rem)',
111111
},
112112
boxShadow: {
113113
box: '0 0 0 1px hsl(var(--ui-border))',
114+
'box-xs':
115+
'0 0 0 1px hsl(var(--ui-border)), 0 1px 2px 0 hsl(var(--ui-border))',
116+
'box-sm':
117+
'0 0 0 1px hsl(var(--ui-border)), 0 1px 3px 0 hsl(var(--ui-border)), 0 1px 2px -1px hsl(var(--ui-border))',
118+
'box-md':
119+
'0 0 0 1px hsl(var(--ui-border)), 0 4px 6px -1px hsl(var(--ui-border)), 0 2px 4px -2px hsl(var(--ui-border))',
120+
'box-lg':
121+
'0 0 0 1px hsl(var(--ui-border)), 0 10px 15px -3px hsl(var(--ui-border)), 0 4px 6px -4px hsl(var(--ui-border))',
122+
'box-xl':
123+
'0 0 0 1px hsl(var(--ui-border)), 0 20px 25px -5px hsl(var(--ui-border)), 0 8px 10px -6px hsl(var(--ui-border))',
124+
'box-2xl':
125+
'0 0 0 1px hsl(var(--ui-border)), 0 25px 50px -12px hsl(var(--ui-border))',
114126
},
115127
colors: {
116128
accent: {
@@ -211,7 +223,7 @@ export const sharedConfig: Config = {
211223
serif: [`var(--font-serif, ${fontFamily.serif.join(', ')})`],
212224
},
213225
height: {
214-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- fix later
226+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- allow for now
215227
// @ts-expect-error
216228
screen: ['100vh', '100dvh'],
217229
},
@@ -411,12 +423,12 @@ export const sharedConfig: Config = {
411423
},
412424
},
413425
maxHeight: {
414-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- fix later
426+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- allow for now
415427
// @ts-expect-error
416428
screen: ['100vh', '100dvh'],
417429
},
418430
minHeight: {
419-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- fix later
431+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- allow for now
420432
// @ts-expect-error
421433
screen: ['100vh', '100dvh'],
422434
},

0 commit comments

Comments
 (0)