From 949b32f2054a84d130bdcffcbe5b598b3aff121d Mon Sep 17 00:00:00 2001 From: ShanaMaid Date: Sun, 24 Jun 2018 23:16:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(alert):=20=E4=BF=AE=E5=A4=8DAlert=E6=9C=89d?= =?UTF-8?q?escription=E6=B2=A1=E6=9C=89icon=E6=97=B6=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Alert/Alert.tsx | 14 ++++++++------ components/Alert/style/index.less | 9 +++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/components/Alert/Alert.tsx b/components/Alert/Alert.tsx index 890075d..d8d0da2 100644 --- a/components/Alert/Alert.tsx +++ b/components/Alert/Alert.tsx @@ -112,12 +112,14 @@ export class Alert extends Component { {icon ? icon : ()} -

{title}

- { - this.props.children ? ( -

{this.props.children}

- ) : null - } +
+

{title}

+ { + this.props.children ? ( +

{this.props.children}

+ ) : null + } +
{ closable ? ( diff --git a/components/Alert/style/index.less b/components/Alert/style/index.less index fed8b2c..45e2ddf 100644 --- a/components/Alert/style/index.less +++ b/components/Alert/style/index.less @@ -63,7 +63,7 @@ &-with-description { - padding: 16px 16px 16px 60px; + padding: 16px; .@{alert-prefix-cls}-icon { position: absolute; @@ -72,11 +72,16 @@ } .@{alert-prefix-cls}-close { - font-size: 20px; + font-size: 14px; right: 8px; } } + &-has-icon-description { + display: inline-block; + padding-left: 46px; + } + &-message { color: rgba(0,0,0,.85); }