diff --git a/src/result/index.js b/src/result/index.js index 24eba67..c1c1f0c 100644 --- a/src/result/index.js +++ b/src/result/index.js @@ -9,83 +9,68 @@ import '../icon/index.js' class Result extends Component { static props = { - title: { - type: String, - default: '', - attribute: false - }, - subTitle: { type: String, default: '' }, - type: { - type: String, - default: 'success' - }, - icon: { - type: String, - default: '' - } + title: 'str!', + subTitle: '', + type: 'success', + icon: '' } static styles = [ css` :host { - position: relative; - display: inline-block; - text-align: center; + display: inline-flex; + } + + :host([type='success']) .icon { + background: var(--color-teal-1); } :host([type='warning']) .icon { - background: #e6a23c; - wc-icon { - transform: translateY(-2px); - } + background: var(--color-orange-1); } :host([type='error']) .icon { - --wc-icon-size: 24px; - background: #f56c6c; + background: var(--color-red-1); } :host([type='info']) .icon { - background: #909399; + background: var(--color-blue-1); } - .result { + + .container { display: flex; - justify-content: center; align-items: center; flex-direction: column; text-align: center; - box-sizing: border-box; - padding: 40px 30px; - } - .icon-wrapper { - display: flex; - align-items: center; - justify-content: center; + max-width: 440px; + padding: 36px 32px; + line-height: 1.5; + font-size: 14px; + color: var(--color-dark-1); } + .icon { display: flex; justify-content: center; align-items: center; - width: 53px; - height: 53px; + width: 52px; + height: 52px; + line-height: 1; border-radius: 50%; + background: var(--wc-result-icon-color, var(--color-dark-1)); color: #fff; - background: #67c23a; } .title { - margin-top: 20px; + margin-top: 16px; + font-size: 18px; } .sub-title { - margin-top: 10px; + margin-top: 6px; } .extra { - margin-top: 30px; - } - span { - font-size: 14px; - color: #5e6d82; - line-height: 1.5em; + margin-top: 12px; } ` ] - get iconName() { + + get #icon() { if (this.icon) { return this.icon } @@ -93,38 +78,28 @@ class Result extends Component { return 'get' } if (this.type === 'error') { - return 'close' + return 'deny' } return this.type } render() { return html` -
-
- -
- -
-
+
+
+
-
- - ${this.title} - -
+

+ ${this.title} +

-
- - ${this.subTitle} - -
+
+ ${this.subTitle} +
-
- -
-
+ + ` } }