Skip to content
This repository was archived by the owner on May 26, 2025. It is now read-only.

Commit 13aac52

Browse files
committed
Update the banner to match the new-ish components
1 parent 7a316de commit 13aac52

20 files changed

+7820
-1627
lines changed

lib/polaris-vue.css

Lines changed: 4722 additions & 1 deletion
Large diffs are not rendered by default.

lib/polaris-vue.js

Lines changed: 58 additions & 54 deletions
Large diffs are not rendered by default.

lib/polaris-vue.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/polaris-vue.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/PolarisBanner.vue

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@
1212
@click="onDismiss">
1313
</polaris-button>
1414
</div>
15-
<div class="Polaris-Banner__Ribbon">
16-
<polaris-icon :source="iconSource"
17-
:color="iconColor"
18-
backdrop>
19-
</polaris-icon>
20-
</div>
2115
<div>
2216
<div v-if="title" class="Polaris-Banner__Heading" :id="realId+'Heading'">
23-
<polaris-heading tag="p">
24-
{{ title }}
25-
</polaris-heading>
17+
<polaris-stack alignment="center">
18+
<polaris-icon
19+
class="Polaris-Banner__Icon"
20+
:source="iconSource"
21+
:color="iconColor">
22+
</polaris-icon>
23+
<polaris-heading tag="p" variant="headingSm">
24+
{{ title }}
25+
</polaris-heading>
26+
</polaris-stack>
2627
</div>
2728
<div v-if="$slots.default || action || secondaryAction || children" class="Polaris-Banner__Content" id="realId+'Content'">
2829
<slot>
@@ -65,7 +66,7 @@ import PolarisButton from './PolarisButton.vue';
6566
import PolarisButtonGroup from './PolarisButtonGroup.vue';
6667
6768
import successIcon from '../resources/banner/circle-check-mark.svg';
68-
import fallbackIcon from '../resources/banner/flag.svg';
69+
import fallbackIcon from '../resources/banner/circle-information.svg';
6970
import warningIcon from '../resources/banner/circle-alert.svg';
7071
import criticalIcon from '../resources/banner/circle-barred.svg';
7172
import infoIcon from '../resources/banner/circle-information.svg';
@@ -151,15 +152,15 @@ export default {
151152
iconColor() {
152153
switch (this.status) {
153154
case 'success':
154-
return 'greenDark';
155+
return 'white';
155156
case 'info':
156-
return 'tealDark';
157+
return 'black';
157158
case 'warning':
158-
return 'yellowDark';
159+
return 'black';
159160
case 'critical':
160-
return 'redDark';
161+
return 'white';
161162
default:
162-
return 'inkLighter';
163+
return 'black';
163164
}
164165
},
165166
classes() {

src/components/PolarisHeading.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<dynamic-tag :tag="tag" class="Polaris-Heading">
2+
<dynamic-tag :tag="tag" class="Polaris-Heading" :class="['Polaris-Heading--' + variant]">
33
<slot></slot>
44
</dynamic-tag>
55
</template>
@@ -14,6 +14,18 @@ export default {
1414
tag: {
1515
type: String,
1616
default: 'h2'
17+
},
18+
variant: {
19+
type: String,
20+
default: 'default',
21+
validator(v) {
22+
return [
23+
'default',
24+
'headingLg',
25+
'headingMd',
26+
'headingSm',
27+
].indexOf(v) !== -1;
28+
}
1729
}
1830
},
1931
components: {
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)