Skip to content

Commit

Permalink
Move OuiBottomBar default inline styles to the CSS file (#693) (#694)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Myssak <[email protected]>
Co-authored-by: Andrey Myssak <[email protected]>
  • Loading branch information
SergeyMyssak and andreymyssak authored May 2, 2023
1 parent 57aaf66 commit 99d61c0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
14 changes: 1 addition & 13 deletions src/components/bottom_bar/__snapshots__/bottom_bar.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Array [
aria-label="aria-label"
class="ouiBottomBar ouiBottomBar--fixed ouiBottomBar--paddingMedium testClass1 testClass2"
data-test-subj="test subject string"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -29,7 +28,6 @@ Array [
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--fixed ouiBottomBar--paddingMedium"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -50,7 +48,6 @@ exports[`OuiBottomBar props bodyClassName is rendered 1`] = `
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--fixed ouiBottomBar--paddingMedium"
style="left: 0px; right: 0px; bottom: 0px;"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -65,7 +62,6 @@ Array [
<section
aria-label="This should have been label"
class="ouiBottomBar ouiBottomBar--fixed ouiBottomBar--paddingMedium"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -87,7 +83,6 @@ Array [
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--fixed ouiBottomBar--paddingLarge"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -109,7 +104,6 @@ Array [
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--fixed ouiBottomBar--paddingMedium"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -131,7 +125,6 @@ Array [
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--fixed"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -153,7 +146,6 @@ Array [
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--fixed ouiBottomBar--paddingSmall"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -175,7 +167,6 @@ Array [
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--fixed ouiBottomBar--paddingMedium"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand Down Expand Up @@ -219,7 +210,6 @@ Array [
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--static ouiBottomBar--paddingMedium"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -241,7 +231,6 @@ Array [
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--sticky ouiBottomBar--paddingMedium"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -263,7 +252,7 @@ Array [
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--fixed ouiBottomBar--paddingMedium"
style="left:12px;right:0;bottom:0"
style="left:12px"
>
<h2
class="ouiScreenReaderOnly"
Expand All @@ -285,7 +274,6 @@ Array [
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--fixed ouiBottomBar--paddingMedium"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand Down
4 changes: 4 additions & 0 deletions src/components/bottom_bar/_bottom_bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
*/

.ouiBottomBar {
bottom: 0;
left: 0;
right: 0;

@include ouiBottomShadowFlat($ouiShadowColorLarge);
background: $ouiHeaderDarkBackgroundColor;
color: $ouiColorGhost;
Expand Down
6 changes: 3 additions & 3 deletions src/components/bottom_bar/bottom_bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ export const OuiBottomBar = forwardRef<
bodyClassName,
landmarkHeading,
usePortal = true,
left = 0,
right = 0,
bottom = 0,
left,
right,
bottom,
top,
style,
...rest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,6 @@ exports[`OuiPageTemplate with bottomBar is rendered 1`] = `
<section
aria-label="Page level controls"
class="ouiBottomBar ouiBottomBar--sticky"
style="left:0;right:0;bottom:0"
>
<h2
class="ouiScreenReaderOnly"
Expand Down

0 comments on commit 99d61c0

Please sign in to comment.