Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement/Disabled buttons styling #96

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions scss/_button.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
@each $color, $value in $theme-colors {
.btn-#{$color} {
@include button-variant(
$value,
$value,
$disabled-background: $gray-500,
$disabled-border: $border-color,
$disabled-color: $light
);
}
}

@each $color, $value in $theme-colors {
.btn-outline-#{$color} {
@include button-outline-variant($value);
}
}

.btn-link {
font-weight: 500;
}
Expand Down Expand Up @@ -25,12 +43,6 @@
background-color: $blue;
border-color: $blue;
}

&.disabled,
&:disabled {
background-color: $primary;
border-color: $primary;
}
}

.btn-secondary {
Expand Down
3 changes: 2 additions & 1 deletion styleguide/_docs/components/buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
{% include component.html url='/patterns/components/buttons/buttons.html' %}
{% include component.html url='/patterns/components/buttons/outline-buttons.html' %}
{% include component.html url='/patterns/components/buttons/buttons-sizes.html' %}
{% include component.html url='/patterns/components/buttons/buttons-states.html' %}
{% include component.html url='/patterns/components/buttons/buttons-states.html' %}
{% include component.html url='/patterns/components/buttons/buttons-disabled.html' %}
16 changes: 16 additions & 0 deletions styleguide/patterns/components/buttons/buttons-disabled.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Disabled button
category: button
category_order: 4
---
<button type="button" class="btn btn-primary disabled">Primary</button>
<button type="button" class="btn btn-secondary disabled">Secondary</button>
<button type="button" class="btn btn-success disabled">Success</button>
<button type="button" class="btn btn-danger disabled">Danger</button>
<button type="button" class="btn btn-warning disabled">Warning</button>
<button type="button" class="btn btn-info disabled">Info</button>
<button type="button" class="btn btn-light disabled">Light</button>
<button type="button" class="btn btn-dark disabled">Dark</button>
<button type="button" class="btn btn-link disabled">Link</button>
<button type="button" class="btn btn-primary btn-icon disabled"><i class="material-icons">check</i></button>

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
category_order: 4
---
<button type="button" class="btn btn-primary active">Active button</button>
<button type="button" class="btn btn-primary disabled">Disabled button</button>
<button type="button" class="btn btn-primary disabled">Disabled button</button>
Loading