Chatwoot/app/javascript/dashboard/assets/scss/widgets/_buttons.scss

116 lines
1.8 KiB
SCSS
Raw Normal View History

$default-button-height: 4.0rem;
.button {
2021-05-20 08:21:46 +00:00
align-items: center;
display: inline-flex;
height: $default-button-height;
margin-bottom: 0;
.button__content {
width: 100%;
}
.spinner {
padding: 0 var(--space-small);
}
.icon--emoji+.button__content {
padding-left: var(--space-small);
}
.icon--font+.button__content {
padding-left: var(--space-small);
2021-05-20 08:21:46 +00:00
}
// @TODDO - Remove after moving all buttons to woot-button
2021-05-20 08:21:46 +00:00
.icon+.button__content {
padding-left: var(--space-small);
}
2021-05-20 08:21:46 +00:00
&.expanded {
display: flex;
justify-content: center;
}
2019-10-27 13:58:02 +00:00
2021-05-20 08:21:46 +00:00
&.round {
border-radius: $space-larger;
}
2021-05-20 08:21:46 +00:00
// @TODO Use with link
&.compact {
padding-bottom: 0;
padding-top: 0;
}
2021-05-20 08:21:46 +00:00
// Smooth style
&.smooth {
@include button-style(var(--w-50), var(--w-100), var(--w-700));
2021-05-20 08:21:46 +00:00
&.secondary {
@include button-style(var(--s-50), var(--s-100), var(--s-700));
2021-05-20 08:21:46 +00:00
}
&.success {
@include button-style(var(--g-50), var(--g-100), var(--g-700));
2021-05-20 08:21:46 +00:00
}
&.alert {
@include button-style(var(--r-50), var(--r-100), var(--r-700));
}
2021-05-20 08:21:46 +00:00
&.warning {
@include button-style(var(--y-100), var(--y-200), var(--y-900));
2021-05-20 08:21:46 +00:00
}
}
2021-05-20 08:21:46 +00:00
// Sizes
&.tiny {
2021-05-20 08:21:46 +00:00
height: var(--space-medium);
}
2021-05-20 08:21:46 +00:00
&.small {
height: var(--space-large);
}
2021-05-20 08:21:46 +00:00
&.large {
height: var(--space-larger);
}
&.button--only-icon {
justify-content: center;
padding-left: 0;
padding-right: 0;
width: $default-button-height;
&.tiny {
width: var(--space-medium);
}
&.small {
width: var(--space-large);
}
&.large {
width: var(--space-larger);
}
}
2021-05-20 08:21:46 +00:00
&.link {
height: auto;
margin: 0;
padding: 0;
}
2021-05-20 08:21:46 +00:00
2019-10-27 13:58:02 +00:00
}
2021-05-20 08:21:46 +00:00
// @TDOD move to utility file
.button--fixed-right-top {
position: fixed;
right: $space-small;
top: $space-small;
}