Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.

Commit

Permalink
Step 3: adding a new button component class
Browse files Browse the repository at this point in the history
  • Loading branch information
colbyfayock committed May 17, 2020
1 parent 5f50cc2 commit 7a76e8a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
14 changes: 13 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind utilities;

.btn {
@apply font-bold py-2 px-4 rounded;
}

.btn-purple {
@apply bg-purple-700 text-white;
}

.btn-purple:hover {
@apply bg-purple-800;
}
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function App() {
Belligerent and numerous.
</p>

<button className="text-white font-bold bg-purple-700 hover:bg-purple-800 py-2 px-4 rounded">
<button className="btn btn-purple">
Party with Slurm!
</button>

Expand Down
24 changes: 24 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -17864,6 +17864,30 @@ video {
transition-delay: 1000ms;
}

.btn {
font-weight: 700;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
padding-left: 1rem;
padding-right: 1rem;
border-radius: 0.25rem;
}

.btn-purple {
--bg-opacity: 1;
background-color: #6b46c1;
background-color: rgba(107, 70, 193, var(--bg-opacity));
--text-opacity: 1;
color: #fff;
color: rgba(255, 255, 255, var(--text-opacity));
}

.btn-purple:hover {
--bg-opacity: 1;
background-color: #553c9a;
background-color: rgba(85, 60, 154, var(--bg-opacity));
}

@media (min-width: 640px) {
.sm\:space-y-0 > :not(template) ~ :not(template) {
--space-y-reverse: 0;
Expand Down

0 comments on commit 7a76e8a

Please sign in to comment.