Skip to content

Commit

Permalink
refactor: pretty formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
herleraja committed Apr 19, 2024
1 parent fe34bab commit 1a0c7ef
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
10 changes: 4 additions & 6 deletions packages/angular/src/table/table.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,8 @@ storiesOf('Components/Table', module)
customSort: (index: number) => {
if (simpleMultiHeaderModel.getClosestHeader(index).sorted) {
// if already sorted flip sorting direction
simpleMultiHeaderModel.getClosestHeader(
index
).ascending = simpleMultiHeaderModel.getClosestHeader(index).descending;
simpleMultiHeaderModel.getClosestHeader(index).ascending =
simpleMultiHeaderModel.getClosestHeader(index).descending;
}
simpleMultiHeaderModel.sort(index);
},
Expand Down Expand Up @@ -216,9 +215,8 @@ storiesOf('Components/Table', module)
customSort: (index: number) => {
if (simpleMultiHeaderModel.getClosestHeader(index).sorted) {
// if already sorted flip sorting direction
simpleMultiHeaderModel.getClosestHeader(
index
).ascending = simpleMultiHeaderModel.getClosestHeader(index).descending;
simpleMultiHeaderModel.getClosestHeader(index).ascending =
simpleMultiHeaderModel.getClosestHeader(index).descending;
}
simpleMultiHeaderModel.sort(index);
},
Expand Down
3 changes: 1 addition & 2 deletions packages/angular/src/toolkit/table/sterling-table.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ const simpleModel = new SCTableModel();
simpleModel.header = [
[
new TableHeaderItem({
data:
'Name Name Name Name Name Name Name Name Name Name \
data: 'Name Name Name Name Name Name Name Name Name Name \
Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name \
Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name Name \
Name Name Name Name Name Name Name Name Name Name \
Expand Down
4 changes: 3 additions & 1 deletion packages/styles/src/components/Button/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
}
}

.#{$iot-prefix}--btn.#{$prefix}--btn.#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only:not(.#{$iot-prefix}--btn-icon-selection--selected).#{$iot-prefix}--btn-icon-selection--recommended {
.#{$iot-prefix}--btn.#{$prefix}--btn.#{$prefix}--btn--ghost.#{$prefix}--btn--icon-only:not(
.#{$iot-prefix}--btn-icon-selection--selected
).#{$iot-prefix}--btn-icon-selection--recommended {
border: 1px solid $support-02;
}

Expand Down
4 changes: 3 additions & 1 deletion packages/styles/src/components/SideNav/_side-nav-carbon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ $small-screen-breakpoint: 65.99em;
// carbon does to anchor element
//////////////////////////////////////
.#{$prefix}--side-nav__menu
.#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not([aria-current='page']):hover {
.#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not(
[aria-current='page']
):hover {
color: $ibm-color__gray-100;
background-color: $shell-side-nav-bg-04;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ $hoverBgColor: #3d3d3d;

.#{$prefix}--side-nav__menu
.#{$prefix}--side-nav__menu
.#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not([aria-current='page']):hover {
.#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not(
[aria-current='page']
):hover {
background-color: $hoverBgColor;
}
}
8 changes: 6 additions & 2 deletions packages/styles/src/components/SideNav/_side-nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ $hoverBgColor: #2c2c2c;
.#{$prefix}--side-nav__menu .#{$prefix}--side-nav__link[aria-current='page'],
.#{$prefix}--side-nav__link--current,
.#{$prefix}--side-nav__menu
.#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not([aria-current='page']):hover {
.#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not(
[aria-current='page']
):hover {
background-color: $selectedBgColor;
}

.#{$prefix}--side-nav__menu
.#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not([aria-current='page']):hover,
.#{$prefix}--side-nav__link:not(.#{$prefix}--side-nav__link--current):not(
[aria-current='page']
):hover,
&.bx--side-nav__menu .bx--side-nav__link--current > span,
&.bx--side-nav__menu .bx--side-nav__link[aria-current='page'] > span,
&.bx--side-nav__link--current > span {
Expand Down

0 comments on commit 1a0c7ef

Please sign in to comment.