From 1a0c7ef7f2a920d3838785601ae9cccedc8f028a Mon Sep 17 00:00:00 2001 From: Amritha raj herle Date: Fri, 19 Apr 2024 18:12:35 +0200 Subject: [PATCH] refactor: pretty formatter --- packages/angular/src/table/table.stories.ts | 10 ++++------ .../src/toolkit/table/sterling-table.stories.ts | 3 +-- packages/styles/src/components/Button/_button.scss | 4 +++- .../src/components/SideNav/_side-nav-carbon.scss | 4 +++- .../src/components/SideNav/_side-nav-multi-tier.scss | 4 +++- packages/styles/src/components/SideNav/_side-nav.scss | 8 ++++++-- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/packages/angular/src/table/table.stories.ts b/packages/angular/src/table/table.stories.ts index 248b8023fa..18b2bc1b8e 100644 --- a/packages/angular/src/table/table.stories.ts +++ b/packages/angular/src/table/table.stories.ts @@ -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); }, @@ -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); }, diff --git a/packages/angular/src/toolkit/table/sterling-table.stories.ts b/packages/angular/src/toolkit/table/sterling-table.stories.ts index 19b2b54f89..a63a36a551 100644 --- a/packages/angular/src/toolkit/table/sterling-table.stories.ts +++ b/packages/angular/src/toolkit/table/sterling-table.stories.ts @@ -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 \ diff --git a/packages/styles/src/components/Button/_button.scss b/packages/styles/src/components/Button/_button.scss index 36c59a75b1..04f90861ae 100644 --- a/packages/styles/src/components/Button/_button.scss +++ b/packages/styles/src/components/Button/_button.scss @@ -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; } diff --git a/packages/styles/src/components/SideNav/_side-nav-carbon.scss b/packages/styles/src/components/SideNav/_side-nav-carbon.scss index 701bfc0956..fe25a05fd0 100644 --- a/packages/styles/src/components/SideNav/_side-nav-carbon.scss +++ b/packages/styles/src/components/SideNav/_side-nav-carbon.scss @@ -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; } diff --git a/packages/styles/src/components/SideNav/_side-nav-multi-tier.scss b/packages/styles/src/components/SideNav/_side-nav-multi-tier.scss index d77b985ec9..2da4a2891c 100644 --- a/packages/styles/src/components/SideNav/_side-nav-multi-tier.scss +++ b/packages/styles/src/components/SideNav/_side-nav-multi-tier.scss @@ -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; } } diff --git a/packages/styles/src/components/SideNav/_side-nav.scss b/packages/styles/src/components/SideNav/_side-nav.scss index 4e1f192141..dff133829e 100644 --- a/packages/styles/src/components/SideNav/_side-nav.scss +++ b/packages/styles/src/components/SideNav/_side-nav.scss @@ -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 {