Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class Popover extends React.Component {
tabIndex={0}
>
{title && <span className={theme.title} aria-label="popover-title">{title}</span>}
{ title && <hr /> }
<div className={classnames(theme.popoverContent)}>{content}</div>
{!noAction && this.renderActionContent()}
<span className={theme.popoverArrow} />
Expand Down
4 changes: 2 additions & 2 deletions lib/popover/tests/accessibility.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
21 changes: 17 additions & 4 deletions lib/popover/theme.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
}

:local(.popoverWrapper) {
filter: drop-shadow(1px 1px 3px rgba(0, 0, 0, 0.3));
margin: 2% 1%;
padding: 10px;
/*
Expand All @@ -21,16 +22,28 @@
white-space: nowrap;
max-width: 100px;
border-radius: 5px;
background-color: $secondary-white;
background-color: #ffffff;
position: absolute;
box-shadow: 1px 0px 8px 1px rgba(0, 0, 0, 0.3);
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;
Expand All @@ -57,7 +70,7 @@
display: inline-block;
min-width: 12px;
min-height: 12px;
background-color: $secondary-white;
background-color: #ffffff;
}

/* top positions */
Expand Down