Skip to content
Snippets Groups Projects
Commit 811e2bd6 authored by Ben Wheeler's avatar Ben Wheeler
Browse files

fixed alert formatting when in gui standalone; made alert button sizing more flexible and smart

parent 41dae7d6
No related branches found
No related tags found
No related merge requests found
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
.alert-connection-button { .alert-connection-button {
min-height: 2rem; min-height: 2rem;
width: 6.5rem;
padding: 0.55rem 0.9rem; padding: 0.55rem 0.9rem;
border-radius: 0.35rem; border-radius: 0.35rem;
background: #FF8C1A; background: #FF8C1A;
...@@ -81,8 +82,9 @@ ...@@ -81,8 +82,9 @@
border: none; border: none;
cursor: pointer; cursor: pointer;
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
align-self: center; align-self: stretch;
outline-style:none; outline-style:none;
} }
...@@ -93,3 +95,9 @@ ...@@ -93,3 +95,9 @@
[dir="rtl"] .alert-connection-button { [dir="rtl"] .alert-connection-button {
margin-left: 13px; margin-left: 13px;
} }
/* prevent last button in list from too much margin to edge of alert */
.alert-buttons > :last-child {
margin-left: 0;
margin-right: 0;
}
...@@ -9,7 +9,6 @@ import Spinner from '../spinner/spinner.jsx'; ...@@ -9,7 +9,6 @@ import Spinner from '../spinner/spinner.jsx';
import {AlertLevels} from '../../lib/alerts/index.jsx'; import {AlertLevels} from '../../lib/alerts/index.jsx';
import styles from './alert.css'; import styles from './alert.css';
import spinnerStyles from '../spinner/spinner.css';
const closeButtonColors = { const closeButtonColors = {
[AlertLevels.SUCCESS]: CloseButton.COLOR_GREEN, [AlertLevels.SUCCESS]: CloseButton.COLOR_GREEN,
...@@ -35,20 +34,22 @@ const AlertComponent = ({ ...@@ -35,20 +34,22 @@ const AlertComponent = ({
className={classNames(styles.alert, styles[level])} className={classNames(styles.alert, styles[level])}
> >
{/* TODO: implement Rtl handling */} {/* TODO: implement Rtl handling */}
<div className={styles.iconSection}> {(iconSpinner || iconURL) && (
{iconSpinner && ( <div className={styles.iconSection}>
<Spinner {iconSpinner && (
className={styles.alertSpinner} <Spinner
level={level} className={styles.alertSpinner}
/> level={level}
)} />
{iconURL && ( )}
<img {iconURL && (
className={styles.alertIcon} <img
src={iconURL} className={styles.alertIcon}
/> src={iconURL}
)} />
</div> )}
</div>
)}
<div className={styles.alertMessage}> <div className={styles.alertMessage}>
{extensionName ? ( {extensionName ? (
<FormattedMessage <FormattedMessage
......
.alerts-inner-container { .alerts-inner-container {
min-width: 200px; min-width: 200px;
max-width: 448px; max-width: 548px;
} }
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
border-width: .1875rem; border-width: .1875rem;
border-style: solid; border-style: solid;
border-color: $ui-white-transparent; border-color: $ui-white-transparent;
box-sizing: content-box;
} }
.spinner::before, .spinner::after { .spinner::before, .spinner::after {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment