mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
fix toast
This commit is contained in:
@@ -4,11 +4,13 @@ import { css } from 'glamor';
|
|||||||
class Alert extends React.PureComponent {
|
class Alert extends React.PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.containerStyle = css({
|
this.containerStyle = css({
|
||||||
borderRadius: '3px',
|
borderRadius: '3px',
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
padding: '20px',
|
padding: '10px 16px',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
boxSizing: 'border-box',
|
||||||
boxShadow: 'rgba(67, 90, 111, 0.3) 0px 0px 1px, rgba(67, 90, 111, 0.47) 0px 8px 10px -4px',
|
boxShadow: 'rgba(67, 90, 111, 0.3) 0px 0px 1px, rgba(67, 90, 111, 0.47) 0px 8px 10px -4px',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
@@ -35,7 +37,7 @@ class Alert extends React.PureComponent {
|
|||||||
fontWeight: '600',
|
fontWeight: '600',
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
color: '#435a6f',
|
color: '#435a6f',
|
||||||
margin: '0',
|
margin: '0'
|
||||||
});
|
});
|
||||||
|
|
||||||
this.toastTextChild = css({
|
this.toastTextChild = css({
|
||||||
@@ -90,7 +92,7 @@ class Alert extends React.PureComponent {
|
|||||||
</div>
|
</div>
|
||||||
<div className={this.toastTextContainer}>
|
<div className={this.toastTextContainer}>
|
||||||
<p className={this.toastTextTitle}>{this.props.title}</p>
|
<p className={this.toastTextTitle}>{this.props.title}</p>
|
||||||
{ <p className={this.toastTextChild}>{this.props.children}</p> }
|
{this.props.children ? <p className={this.toastTextChild}>{this.props.children}</p> : null}
|
||||||
</div>
|
</div>
|
||||||
<div onClick={this.props.onRemove} className={this.toastClose}>
|
<div onClick={this.props.onRemove} className={this.toastClose}>
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
|
Reference in New Issue
Block a user