chore: Refactor button styles (#2259)
This commit is contained in:
committed by
GitHub
parent
af8e681f2a
commit
c681e8a01b
@@ -6,13 +6,11 @@
|
||||
border-radius: 1000px;
|
||||
}
|
||||
|
||||
&.grey-btn {
|
||||
color: $color-gray;
|
||||
|
||||
&:hover {
|
||||
color: $color-light-gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button-wrapper .button.link.grey-btn {
|
||||
margin-left: var(--space-normal);
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
|
||||
@@ -238,7 +238,7 @@ $breadcrumbs-item-slash: true;
|
||||
// 11. Button
|
||||
// ----------
|
||||
|
||||
$button-padding: var(--space-one) var(--space-slab);
|
||||
$button-padding: var(--space-smaller) 1em;
|
||||
$button-margin: 0 0 $global-margin 0;
|
||||
$button-fill: solid;
|
||||
$button-background: $primary-color;
|
||||
@@ -246,7 +246,7 @@ $button-background-hover: scale-color($button-background, $lightness: -15%);
|
||||
$button-color: $white;
|
||||
$button-color-alt: $white;
|
||||
$button-radius: var(--border-radius-normal);
|
||||
$button-sizes: (tiny: var(--font-size-nano),
|
||||
$button-sizes: (tiny: var(--font-size-micro),
|
||||
small: var(--font-size-mini),
|
||||
default: var(--font-size-small),
|
||||
large: var(--font-size-medium));
|
||||
|
||||
@@ -1,8 +1,28 @@
|
||||
@import 'shared/assets/fonts/inter';
|
||||
@import 'shared/assets/stylesheets/colors';
|
||||
@import 'shared/assets/stylesheets/spacing';
|
||||
@import 'shared/assets/stylesheets/font-size';
|
||||
@import 'shared/assets/stylesheets/font-weights';
|
||||
@import 'shared/assets/stylesheets/shadows';
|
||||
@import 'shared/assets/stylesheets/border-radius';
|
||||
|
||||
@import 'variables';
|
||||
|
||||
@import 'mixins';
|
||||
@import 'foundation-settings';
|
||||
@import 'helper-classes';
|
||||
|
||||
@import 'foundation-sites/scss/foundation';
|
||||
@import '~bourbon/core/bourbon';
|
||||
|
||||
@include foundation-everything($flex: true);
|
||||
|
||||
|
||||
@import 'typography';
|
||||
@import 'layout';
|
||||
@import 'animations';
|
||||
|
||||
@import 'foundation-custom';
|
||||
|
||||
@import 'widgets/buttons';
|
||||
@import 'widgets/conv-header';
|
||||
@import 'widgets/conversation-card';
|
||||
@@ -27,3 +47,4 @@
|
||||
@import 'plugins/multiselect';
|
||||
@import 'plugins/dropdown';
|
||||
@import '@chatwoot/prosemirror-schema/src/woot-editor.css';
|
||||
@import '~shared/assets/stylesheets/ionicons';
|
||||
|
||||
@@ -1,20 +1 @@
|
||||
@import 'shared/assets/fonts/inter';
|
||||
@import 'shared/assets/stylesheets/colors';
|
||||
@import 'shared/assets/stylesheets/spacing';
|
||||
@import 'shared/assets/stylesheets/font-size';
|
||||
@import 'shared/assets/stylesheets/font-weights';
|
||||
@import 'shared/assets/stylesheets/shadows';
|
||||
@import 'shared/assets/stylesheets/border-radius';
|
||||
@import 'variables';
|
||||
|
||||
@import '~spinkit/scss/spinners/7-three-bounce';
|
||||
@import '~shared/assets/stylesheets/ionicons';
|
||||
|
||||
@import 'mixins';
|
||||
@import 'foundation-settings';
|
||||
@import 'helper-classes';
|
||||
@import 'foundation-sites/scss/foundation';
|
||||
@import '~bourbon/core/bourbon';
|
||||
|
||||
@include foundation-everything($flex: true);
|
||||
@import 'woot';
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
@import 'foundation-settings';
|
||||
@import 'helper-classes';
|
||||
@import 'foundation-sites/scss/foundation';
|
||||
|
||||
@include foundation-prototype-spacing;
|
||||
@import '~bourbon/core/bourbon';
|
||||
|
||||
@include foundation-everything($flex: true);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
.button {
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
height: 4.0rem;
|
||||
margin-bottom: 0;
|
||||
|
||||
&.button--emoji {
|
||||
@@ -19,52 +22,76 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
&.icon {
|
||||
padding-left: $space-normal;
|
||||
padding-right: $space-normal;
|
||||
|
||||
i {
|
||||
padding-right: $space-small;
|
||||
}
|
||||
.spinner {
|
||||
padding: 0 var(--space-small);
|
||||
}
|
||||
|
||||
&.nice {
|
||||
border-radius: $space-smaller;
|
||||
.icon+.button__content {
|
||||
padding-left: var(--space-small);
|
||||
}
|
||||
|
||||
&.hollow {
|
||||
&.link {
|
||||
border-color: transparent;
|
||||
padding-left: 0;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
>.icon {
|
||||
font-size: $font-size-default;
|
||||
}
|
||||
|
||||
&.tiny {
|
||||
font-size: $font-size-mini;
|
||||
padding: $space-small $space-slab;
|
||||
&.expanded {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&.round {
|
||||
border-radius: $space-larger;
|
||||
}
|
||||
|
||||
// @TODO Use with link
|
||||
|
||||
&.compact {
|
||||
padding-bottom: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
// Smooth style
|
||||
&.smooth {
|
||||
@include button-style(var(--w-100), var(--w-50), var(--w-700));
|
||||
|
||||
|
||||
&.secondary {
|
||||
@include button-style(var(--s-100), var(--s-50), var(--s-700));
|
||||
}
|
||||
|
||||
&.success {
|
||||
@include button-style(var(--g-100), var(--g-50), var(--g-700));
|
||||
}
|
||||
|
||||
&.alert {
|
||||
@include button-style(var(--r-100), var(--r-50), var(--r-700));
|
||||
}
|
||||
|
||||
&.warning {
|
||||
@include button-style(var(--y-200), var(--y-100), var(--y-900));
|
||||
}
|
||||
}
|
||||
|
||||
// Sizes
|
||||
&.tiny {
|
||||
height: var(--space-medium);
|
||||
}
|
||||
|
||||
&.small {
|
||||
height: var(--space-large);
|
||||
}
|
||||
|
||||
&.large {
|
||||
height: var(--space-larger);
|
||||
}
|
||||
|
||||
&.link {
|
||||
height: auto;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// @TDOD move to utility file
|
||||
.button--fixed-right-top {
|
||||
position: fixed;
|
||||
right: $space-small;
|
||||
|
||||
@@ -2,11 +2,11 @@ $resolve-button-width: 13.2rem;
|
||||
|
||||
// Conversation header - Light BG
|
||||
.conv-header {
|
||||
@include padding($space-small $space-normal);
|
||||
@include background-white;
|
||||
@include flex;
|
||||
@include flex-align($x: justify, $y: middle);
|
||||
@include border-normal-bottom;
|
||||
padding: var(--space-small) var(--space-normal);
|
||||
|
||||
.multiselect-box {
|
||||
@include flex;
|
||||
@@ -70,6 +70,7 @@ $resolve-button-width: 13.2rem;
|
||||
|
||||
|
||||
.header-actions-wrap {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-grow: 1;
|
||||
|
||||
@@ -76,7 +76,6 @@
|
||||
|
||||
.status--filter {
|
||||
@include padding($zero null $zero $space-normal);
|
||||
@include round-corner;
|
||||
@include margin($space-smaller $space-slab $zero $zero);
|
||||
background-color: $color-background-light;
|
||||
border: 1px solid $color-border;
|
||||
|
||||
Reference in New Issue
Block a user