Skip to content

Commit

Permalink
V2 panel fix (#148)
Browse files Browse the repository at this point in the history
* fix panel blank spacing

* fixed toggle color on dark background
  • Loading branch information
lghiur authored Aug 7, 2020
1 parent 4f09585 commit d6d06cc
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/index.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions lib/sass/components/Panel/sass/Panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.tyk-panel {
background: white;
border-radius: $panel-border-radius;
margin-bottom: map-get($spacing, 'md');
margin-bottom: 20px;
font-family: $font-family-medium;
position: relative;

Expand All @@ -23,7 +23,7 @@

> .tyk-icon,
> .tyk-tooltip__wrapper {
margin-left: map-get($spacing, 'xs');
margin-left: 5px;
}
}

Expand All @@ -35,15 +35,15 @@

&--blank {
&.tyk-panel--collapsed {
margin-bottom: map-get($spacing, 'md');
margin-bottom: 20px;

.tyk-panel__header {
margin-bottom: 0;
}
}

.tyk-panel__header {
margin-bottom: -map-get($spacing, 'md');
margin-bottom: -20px;
padding: $padding-y-blank-panel-header $padding-x-panel-header;
@include panel-variant(
white,
Expand Down Expand Up @@ -169,7 +169,7 @@
.collapsable__arrow-left {
font-size: text-scale('sm');
position: absolute;
padding: 8px 0px map-get($spacing, 'sm') map-get($spacing, 'md');
padding: 8px 0px map-get($spacing, 'sm') 20px;
left: 0px;
top: calc(50% - 21px);
}
Expand All @@ -183,6 +183,6 @@
padding: map-get($spacing, 'lg');

>:not(:first-child) {
margin-left: map-get($spacing, 'xs');
margin-left: 5px;
}
}
4 changes: 4 additions & 0 deletions lib/sass/components/Toggle/sass/Toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@
color: $toggle-list-text-color-on-dark;
}

&--on-dark &__item-notch--single {
background: theme-color('background', 'light');
}

&--sm label {
@include button-size(
calc(#{$padding-y-button-sm} + 2px),
Expand Down
2 changes: 1 addition & 1 deletion lib/sass/components/Toggle/sass/variables.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$toggle-font-family: $font-family-bold !default;
$toggle-list-background-color: theme-color('background', 'light') !default;
$toggle-list-text-color: white !default;
$toggle-list-background-color-on-dark: theme-color('background', 'light') !default;
$toggle-list-background-color-on-dark: white !default;
$toggle-list-text-color-on-dark: $text-color !default;
$toggle-top: 4px !default;
$toggle-bottom: 4px !default;
Expand Down
2 changes: 1 addition & 1 deletion lib/tyk-ui.css

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/components/Panel/sass/Panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.tyk-panel {
background: white;
border-radius: $panel-border-radius;
margin-bottom: map-get($spacing, 'md');
margin-bottom: 20px;
font-family: $font-family-medium;
position: relative;

Expand All @@ -23,7 +23,7 @@

> .tyk-icon,
> .tyk-tooltip__wrapper {
margin-left: map-get($spacing, 'xs');
margin-left: 5px;
}
}

Expand All @@ -35,15 +35,15 @@

&--blank {
&.tyk-panel--collapsed {
margin-bottom: map-get($spacing, 'md');
margin-bottom: 20px;

.tyk-panel__header {
margin-bottom: 0;
}
}

.tyk-panel__header {
margin-bottom: -map-get($spacing, 'md');
margin-bottom: -20px;
padding: $padding-y-blank-panel-header $padding-x-panel-header;
@include panel-variant(
white,
Expand Down Expand Up @@ -169,7 +169,7 @@
.collapsable__arrow-left {
font-size: text-scale('sm');
position: absolute;
padding: 8px 0px map-get($spacing, 'sm') map-get($spacing, 'md');
padding: 8px 0px map-get($spacing, 'sm') 20px;
left: 0px;
top: calc(50% - 21px);
}
Expand All @@ -183,6 +183,6 @@
padding: map-get($spacing, 'lg');

>:not(:first-child) {
margin-left: map-get($spacing, 'xs');
margin-left: 5px;
}
}
4 changes: 4 additions & 0 deletions src/components/Toggle/sass/Toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@
color: $toggle-list-text-color-on-dark;
}

&--on-dark &__item-notch--single {
background: theme-color('background', 'light');
}

&--sm label {
@include button-size(
calc(#{$padding-y-button-sm} + 2px),
Expand Down
2 changes: 1 addition & 1 deletion src/components/Toggle/sass/variables.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$toggle-font-family: $font-family-bold !default;
$toggle-list-background-color: theme-color('background', 'light') !default;
$toggle-list-text-color: white !default;
$toggle-list-background-color-on-dark: theme-color('background', 'light') !default;
$toggle-list-background-color-on-dark: white !default;
$toggle-list-text-color-on-dark: $text-color !default;
$toggle-top: 4px !default;
$toggle-bottom: 4px !default;
Expand Down
2 changes: 1 addition & 1 deletion tyk-ui-styleguide

0 comments on commit d6d06cc

Please sign in to comment.