-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(VBtn): extract btn styles into file
- Loading branch information
Showing
2 changed files
with
178 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
.btn { | ||
@apply transition duration-300 cursor-pointer inline-flex items-center justify-center | ||
focus:outline-none font-semibold px-4 py-2 text-sm; | ||
} | ||
.btn--xs { | ||
@apply px-1.5 py-0.5; | ||
} | ||
|
||
.btn--sm { | ||
@apply px-2 py-1; | ||
} | ||
|
||
.btn--md { | ||
} | ||
|
||
.btn--lg { | ||
@apply px-5 py-3; | ||
} | ||
|
||
.btn--xl { | ||
@apply px-6 py-4; | ||
} | ||
|
||
.btn--ring { | ||
@apply focus:ring focus:ring-offset-2 focus:ring-opacity-50; | ||
} | ||
|
||
/** button icons **/ | ||
.btn--icon { | ||
@apply p-0; | ||
} | ||
|
||
.btn--icon.btn--xs { | ||
@apply w-[30px] h-[30px]; | ||
} | ||
|
||
.btn--icon.btn--sm { | ||
@apply w-[36px] h-[36px]; | ||
} | ||
|
||
.btn--icon.btn--md { | ||
@apply w-[40px] h-[40px]; | ||
} | ||
|
||
.btn--icon.btn--lg { | ||
@apply w-[50px] h-[50px]; | ||
} | ||
|
||
.btn--icon.btn--xl { | ||
@apply w-[60px] h-[60px]; | ||
} | ||
|
||
/** variants */ | ||
|
||
.btn--default:not(.btn--outlined):not(.btn--text) { | ||
@apply border-gray-800 text-gray-800 | ||
hover:text-gray-900 hover:border-gray-900 active:text-gray-600 active:border-gray-600; | ||
} | ||
|
||
.btn--dark:not(.btn--outlined):not(.btn--text) { | ||
@apply border-gray-800 bg-gray-800 text-white | ||
hover:bg-gray-900 hover:border-gray-900 active:text-gray-200 active:border-gray-200; | ||
} | ||
|
||
.btn--primary:not(.btn--outlined):not(.btn--text) { | ||
@apply border-primary-500 bg-primary-500 text-white | ||
hover:bg-primary-600 hover:border-primary-600 | ||
active:bg-primary-700 active:border-primary-700; | ||
} | ||
|
||
.btn--secondary:not(.btn--outlined):not(.btn--text) { | ||
@apply border-secondary-500 bg-secondary-500 text-white | ||
hover:bg-secondary-600 hover:border-secondary-600 | ||
active:bg-secondary-700 active:border-secondary-700; | ||
} | ||
|
||
.btn--info:not(.btn--outlined):not(.btn--text) { | ||
@apply border-info-500 bg-info-500 text-white | ||
hover:bg-info-600 hover:border-info-600 | ||
active:bg-info-700 active:border-info-700; | ||
} | ||
|
||
.btn--success:not(.btn--outlined):not(.btn--text) { | ||
@apply border-success-500 bg-success-500 text-white | ||
hover:bg-success-600 hover:border-success-600 | ||
active:bg-success-700 active:border-success-700; | ||
} | ||
|
||
.btn--warning:not(.btn--outlined):not(.btn--text) { | ||
@apply border-warning-500 bg-warning-500 text-white | ||
hover:bg-warning-600 hover:border-warning-600 | ||
active:bg-warning-700 active:border-warning-700; | ||
} | ||
|
||
.btn--error:not(.btn--outlined):not(.btn--text) { | ||
@apply border-error-500 bg-error-500 text-white | ||
hover:bg-error-600 hover:border-error-600 | ||
active:bg-error-700 active:border-error-700; | ||
} | ||
|
||
/** outlined */ | ||
.btn--outlined { | ||
@apply bg-transparent; | ||
} | ||
|
||
.btn--default.btn--outlined { | ||
@apply border-gray-800 text-gray-800 | ||
hover:bg-gray-900 hover:text-white hover:border-gray-900 active:text-gray-300 active:border-gray-300; | ||
} | ||
.btn--dark.btn--outlined { | ||
@apply border-gray-800 text-gray-800 hover:text-white | ||
hover:bg-gray-900 hover:border-gray-900 active:text-gray-200 active:border-gray-200; | ||
} | ||
.btn--primary.btn--outlined { | ||
@apply border-primary-500 text-primary-500 | ||
hover:bg-primary-600 hover:text-white hover:border-primary-600 | ||
active:text-primary-100; | ||
} | ||
|
||
.btn--secondary.btn--outlined { | ||
@apply border-secondary-500 text-secondary-500 | ||
hover:bg-secondary-600 hover:text-white hover:border-secondary-600 | ||
active:text-secondary-100; | ||
} | ||
.btn--info.btn--outlined { | ||
@apply border-info-500 text-info-500 | ||
hover:bg-info-600 hover:text-white hover:border-info-600 | ||
active:text-info-100; | ||
} | ||
.btn--warning.btn--outlined { | ||
@apply border-warning-500 text-warning-500 | ||
hover:bg-warning-600 hover:text-white hover:border-warning-600 | ||
active:text-warning-100; | ||
} | ||
.btn--success.btn--outlined { | ||
@apply border-success-500 text-success-500 | ||
hover:bg-success-600 hover:text-white hover:border-success-600 | ||
active:text-success-100; | ||
} | ||
.btn--error.btn--outlined { | ||
@apply border-error-500 text-error-500 | ||
hover:bg-error-600 hover:text-white hover:border-error-600 | ||
active:text-error-100; | ||
} | ||
|
||
/** text */ | ||
.btn--text { | ||
@apply bg-transparent border-none; | ||
} | ||
|
||
.btn--default.btn--text { | ||
@apply text-gray-800 hover:text-gray-900 active:text-gray-700; | ||
} | ||
.btn--dark.btn--text { | ||
@apply text-gray-800 hover:text-gray-900 active:text-gray-700; | ||
} | ||
.btn--primary.btn--text { | ||
@apply text-primary-500 hover:text-primary-600 active:text-primary-400; | ||
} | ||
.btn--secondary.btn--text { | ||
@apply text-secondary-500 hover:text-secondary-600 active:text-secondary-400; | ||
} | ||
.btn--info.btn--text { | ||
@apply text-info-500 hover:text-info-600 active:text-info-400; | ||
} | ||
.btn--warning.btn--text { | ||
@apply text-warning-500 hover:text-warning-600 active:text-warning-400; | ||
} | ||
.btn--success.btn--text { | ||
@apply text-success-500 hover:text-success-600 active:text-success-400; | ||
} | ||
.btn--error.btn--text { | ||
@apply text-error-500 hover:text-error-600 active:text-error-400; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters