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
12 changes: 9 additions & 3 deletions _inc/client/components/global-notices/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,24 @@
right: 16px;
bottom: auto;
left: auto;
max-width: calc( 100% - 32px );

/* `36px` being the width of the collapsed WP-admin sidebar */
max-width: calc( 100% - 32px - 36px );
}

@include breakpoint( ">960px" ) {
top: 47px + 24px;
right: 24px;
max-width: calc( 100% - 48px );

/* `160px` being the width of the WP-admin sidebar */
max-width: calc( 100% - 48px - 160px );
}

@include breakpoint( ">1040px" ) {
right: 32px;
max-width: calc( 100% - 64px );

/* `160px` being the width of the WP-admin sidebar */
max-width: calc( 100% - 64px - 160px );
}
}

Expand Down
6 changes: 5 additions & 1 deletion _inc/client/components/notice/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ export default class SimpleNotice extends React.Component {
return icon;
};

clearText( text ) {
return text.replace( /(<([^>]+)>)/gi, '' );
}

render() {
const {
children,
Expand All @@ -99,7 +103,7 @@ export default class SimpleNotice extends React.Component {
<Gridicon className="dops-notice__icon" icon={ icon || this.getIcon() } size={ 24 } />
</span>
<span className="dops-notice__content">
<span className="dops-notice__text">{ text ? text : children }</span>
<span className="dops-notice__text">{ text ? this.clearText( text ) : children }</span>
</span>
{ text ? children : null }
{ showDismiss && (
Expand Down