Skip to content

Commit ad312dd

Browse files
committed
feat(website): nodified buttons
modified buttons
1 parent ea75f5f commit ad312dd

File tree

3 files changed

+62
-24
lines changed

3 files changed

+62
-24
lines changed

apps/website/public/Button-bg.svg

Lines changed: 2 additions & 0 deletions
Loading
Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,62 @@
11
import { component$ } from '@builder.io/qwik';
2-
2+
import {
3+
Card,
4+
CardBody,
5+
CardTitle,
6+
CardActions,
7+
CardImage,
8+
} from '@qwik-ui/headless';
9+
import { Button } from '@qwik-ui/primitives';
310
export interface ThemeButton {
411
theme?: 'Headless' | 'Daisy';
512
}
613
export default component$(({ theme }: ThemeButton) => {
714
return (
8-
<a href="/docs">
9-
<button
10-
type="button"
11-
class={` shadow-md hover:shadow-lg w-96 h-72 w text-slate-100 ease-in duration-500 bg-slate-600 transition-transform rounded-xl active:rounded-3xl ${
12-
theme === 'Headless' ? ' hover:bg-yellow-600 ' : ' hover:bg-green-600'
15+
<Card
16+
class={`custom-card bg-slate-900 w-96 rounded-xl overflow-hidden active:rounded-3xl grow ${
17+
theme === 'Headless' ? 'hover:bg-green-500' : 'hover:bg-yellow-600'
18+
}`}
19+
>
20+
<CardImage
21+
src={`${
22+
theme === 'Headless' ? '/qwik-headless.png' : '/qwik-daisy.png'
1323
}`}
14-
>
15-
<div class="bg-slate-900">
16-
<img
17-
src={`${
18-
theme === 'Headless' ? '/qwik-headless.png' : '/qwik-daisy.png'
19-
}`}
20-
class="w-72 h-48 self-center mx-auto"
21-
/>
22-
</div>
23-
<div>
24-
<h2>{theme}</h2>
25-
<p>
26-
Yooo {theme} is the best option 4 u! don't listen to the other box
27-
next to me
28-
</p>
29-
</div>
30-
</button>
31-
</a>
24+
alt={`${theme === 'Headless' ? 'Headless kit' : 'Daisy kit'}`}
25+
class="w-full h-48 self-center my-0 mx-auto bg-[url('/Button-bg.svg')] bg-no-repeat bg-cover"
26+
/>
27+
<CardBody class={`custom-card-body mx-8 my-6`}>
28+
<CardTitle class="text-xl font-extrabold">{theme}</CardTitle>
29+
<p>
30+
Yooo {theme} is the best option 4 u! don't listen to the other box
31+
</p>
32+
<CardActions class="custom-card-actions"></CardActions>
33+
</CardBody>
34+
</Card>
3235
);
36+
// return (
37+
// <a href="/docs">
38+
// <button
39+
// type="button"
40+
// class={`border shadow-md hover:shadow-lg w-96 h-72 w text-slate-100 ease-in duration-500 bg-slate-600 transition-transform rounded-xl active:rounded-3xl ${
41+
// theme === 'Headless' ? ' hover:bg-yellow-600 ' : ' hover:bg-green-600'
42+
// }`}
43+
// >
44+
// <div class="bg-slate-900 border relative top-0">
45+
// <img
46+
// src={`${
47+
// theme === 'Headless' ? '/qwik-headless.png' : '/qwik-daisy.png'
48+
// }`}
49+
// class="w-72 h-48 self-center my-0 mx-auto"
50+
// />
51+
// </div>
52+
// <div>
53+
// <h2>{theme}</h2>
54+
// <p>
55+
// Yooo {theme} is the best option 4 u! don't listen to the other box
56+
// next to me
57+
// </p>
58+
// </div>
59+
// </button>
60+
// </a>
61+
// );
3362
});

apps/website/tailwind.config.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,11 @@ module.exports = {
1212
themes: ['light', 'dark'],
1313
base: true,
1414
},
15+
theme: {
16+
extend: {
17+
backgroundImage: {
18+
'optional-theme-bg': "url('/Button-bg.svg')",
19+
},
20+
},
21+
},
1522
};

0 commit comments

Comments
 (0)