From 2cde2d7a19975005df93aade3cac2dbc20e726bb Mon Sep 17 00:00:00 2001 From: rishichawda Date: Mon, 31 Dec 2018 12:17:59 +0530 Subject: [PATCH 1/4] fix(popover): fix popover shadow #287 --- lib/popover/theme.module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/popover/theme.module.scss b/lib/popover/theme.module.scss index faca8ef8..89a89105 100644 --- a/lib/popover/theme.module.scss +++ b/lib/popover/theme.module.scss @@ -7,6 +7,7 @@ } :local(.popoverWrapper) { + filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); margin: 2% 1%; padding: 10px; /* @@ -23,7 +24,6 @@ border-radius: 5px; background-color: $secondary-white; position: absolute; - box-shadow: 1px 0px 8px 1px rgba(0, 0, 0, 0.3); outline: none; z-index: 999; // render on top of any content } From 227ac02fc4b5032a81e6e2f686301a0450392f41 Mon Sep 17 00:00:00 2001 From: rishichawda Date: Mon, 31 Dec 2018 13:01:56 +0530 Subject: [PATCH 2/4] fix(popover): update popover background and font, add separator --- lib/popover/index.js | 1 + lib/popover/theme.module.scss | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/popover/index.js b/lib/popover/index.js index 9c170bd2..2bc78edf 100644 --- a/lib/popover/index.js +++ b/lib/popover/index.js @@ -108,6 +108,7 @@ class Popover extends React.Component { tabIndex={0} > {title && {title}} + { title &&
}
{content}
{!noAction && this.renderActionContent()} diff --git a/lib/popover/theme.module.scss b/lib/popover/theme.module.scss index 89a89105..790832c0 100644 --- a/lib/popover/theme.module.scss +++ b/lib/popover/theme.module.scss @@ -7,7 +7,7 @@ } :local(.popoverWrapper) { - filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.5)); + filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.3)); margin: 2% 1%; padding: 10px; /* @@ -22,15 +22,28 @@ white-space: nowrap; max-width: 100px; border-radius: 5px; - background-color: $secondary-white; + background-color: #ffffff; position: absolute; outline: none; + font-size: 0.9em; z-index: 999; // render on top of any content + font-variant-ligatures: none; + -webkit-font-variant-ligatures: none; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + font-smooth: antialiased; + -webkit-font-smoothing: antialiased; + text-shadow: rgba(0, 0, 0, .01) 0 0 1px; + hr { + width: 100%; + height: 1px; + background-color: rgba(0, 0, 0, 0.3); + border: none; + } } :local(.title) { display: inline-block; - font-size: 18px; font-weight: bold; text-transform: capitalize; margin-bottom: 10px; From 20aaac05c86a096273a0ad952c9bd834d9ad7371 Mon Sep 17 00:00:00 2001 From: rishichawda Date: Mon, 31 Dec 2018 18:19:45 +0530 Subject: [PATCH 3/4] test(popover): fix breaking test --- lib/popover/tests/accessibility.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/popover/tests/accessibility.test.js b/lib/popover/tests/accessibility.test.js index 1a9c20a1..b155c0cb 100644 --- a/lib/popover/tests/accessibility.test.js +++ b/lib/popover/tests/accessibility.test.js @@ -75,9 +75,9 @@ describe('Popover accessibility tests', () => { .props .children; simulateEvent(Button, 'click'); - expect(actualValue()[2].props['aria-label']).to.equal(expectedValueBefore); + expect(actualValue()[3].props['aria-label']).to.equal(expectedValueBefore); wrappedComponent.setProps({ noAction: true }); - expect(actualValue()[2]).to.equal(expectedValueAfter); + expect(actualValue()[3]).to.equal(expectedValueAfter); }); it('Should not render title when title prop is not passed', () => { From 7c45f250b50bb9ef34f00dbc4a5fd0e3e4a84d91 Mon Sep 17 00:00:00 2001 From: rishichawda Date: Wed, 2 Jan 2019 11:05:19 +0530 Subject: [PATCH 4/4] fix(popover): fix popover arrow color --- lib/popover/theme.module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/popover/theme.module.scss b/lib/popover/theme.module.scss index 790832c0..d6e7afb4 100644 --- a/lib/popover/theme.module.scss +++ b/lib/popover/theme.module.scss @@ -70,7 +70,7 @@ display: inline-block; min-width: 12px; min-height: 12px; - background-color: $secondary-white; + background-color: #ffffff; } /* top positions */