Skip to content

Commit 90e69c4

Browse files
Merge pull request #57 from saroshfarhan/feature/card-with-button
added a card with button using tailwind css
2 parents f2bb492 + bd80838 commit 90e69c4

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import {stripIndent} from "react-codepen-prefill-embed";
2+
3+
const cardWithButton = stripIndent `
4+
<div class="py-8 px-8 max-w-sm mx-auto mt-12 bg-white rounded-xl shadow-lg space-y-2 sm:py-4 sm:flex sm:items-center sm:space-y-0 sm:space-x-6">
5+
<img class="block mx-auto h-24 rounded-full sm:mx-0 sm:shrink-0" src="https://thispersondoesnotexist.com/image" alt="Woman's Face">
6+
<div class="text-center space-y-2 sm:text-left">
7+
<div class="space-y-0.5">
8+
<p class="text-lg text-black font-semibold">
9+
Erin Lindford
10+
</p>
11+
<p class="text-slate-500 font-medium">
12+
Product Engineer
13+
</p>
14+
</div>
15+
<button class="px-4 py-1 text-sm text-purple-600 font-semibold rounded-full border border-purple-200 hover:text-white hover:bg-purple-600 hover:border-transparent focus:outline-none focus:ring-2 focus:ring-purple-600 focus:ring-offset-2">Message</button>
16+
</div>
17+
</div>
18+
`;
19+
20+
export default cardWithButton;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import test from "./test_file";
22
import test1 from "./test1_file";
3+
import cardWithButton from "./card_with_button_button1";
34

45
const buttonCollections = [
56
{componentName: "button1", component: test},
67
{componentName: "button2", component: test1},
8+
{componentName: "Card with button", component: cardWithButton},
79
];
810

911
export default buttonCollections;

0 commit comments

Comments
 (0)