Skip to content

Instantly share code, notes, and snippets.

@handrihmw
Created October 24, 2022 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save handrihmw/931c83f02a6f2defc8340250d40708f4 to your computer and use it in GitHub Desktop.
Save handrihmw/931c83f02a6f2defc8340250d40708f4 to your computer and use it in GitHub Desktop.
// Button Variants
$buttonType: (
(primary $as-orange-100 $as-orange-200 $as-orange-300 $as-shadow-orange-100),
(secondary $as-blue-100 $as-blue-200 $as-blue-300 $as-shadow-blue-100),
(danger $as-red-100 $as-red-200 $as-red-300 $as-shadow-red-100)
);
.as-btn {
@extend %btn-helper !optional;
}
@each $button in $buttonType {
.as-btn--#{nth($button, 1)} {
background: #{nth($button, 2)};
border: 1px solid transparent;
box-shadow: #{nth($button, 5)};
color: $as-white;
cursor: pointer;
&:hover {
background: #{nth($button, 3)};
}
&:focus,
&:active,
&.as-btn--active {
background: #{nth($button, 4)};
border: 1px solid $as-white;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment