Redesign notification dismiss button

X wasn’t centering properly
pull/10616/head
Alex P 2018-03-07 14:48:13 -08:00 committed by Andrew Watkins
parent cbd15ec80c
commit f7ec33f5db
2 changed files with 23 additions and 3 deletions

View File

@ -66,9 +66,7 @@ class Notification extends Component {
<div className="notification-message"> <div className="notification-message">
{message} {message}
</div> </div>
<button className="notification-close" onClick={this.handleDismiss}> <button className="notification-close" onClick={this.handleDismiss} />
<span className="icon remove" />
</button>
</div> </div>
</div> </div>
) )

View File

@ -60,6 +60,24 @@ $notification-margin: 12px;
transition: transition:
opacity 0.25s ease; opacity 0.25s ease;
&:before,
&:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 16px;
height: 2px;
border-radius: 1px;
background-color: $g20-white;
}
&:before {
transform: translate(-50%,-50%) rotate(-45deg);
}
&:after {
transform: translate(-50%,-50%) rotate(45deg);
}
&:hover { &:hover {
cursor: pointer; cursor: pointer;
opacity: 1; opacity: 1;
@ -108,6 +126,10 @@ $notification-margin: 12px;
span.icon { span.icon {
color: $text-color; color: $text-color;
} }
.notification-close:before,
.notification-close:after {
background-color: $text-color;
}
} }
// Alert Themes // Alert Themes