@khanacademy/wonder-blocks-banner 1.0.1 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @khanacademy/wonder-blocks-banner
2
2
 
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ceb111df]
8
+ - @khanacademy/wonder-blocks-button@3.0.7
9
+ - @khanacademy/wonder-blocks-icon-button@3.4.15
10
+ - @khanacademy/wonder-blocks-link@3.8.13
11
+
12
+ ## 1.1.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 87572f0a: Add ariaLabel prop
17
+
18
+ ### Patch Changes
19
+
20
+ - 150021e2: Fix border
21
+ - d3da219c: Add dependency to WB link
22
+
3
23
  ## 1.0.1
4
24
 
5
25
  ### Patch Changes
package/dist/es/index.js CHANGED
@@ -4,8 +4,8 @@ import Button from '@khanacademy/wonder-blocks-button';
4
4
  import Color from '@khanacademy/wonder-blocks-color';
5
5
  import { View } from '@khanacademy/wonder-blocks-core';
6
6
  import Icon, { icons } from '@khanacademy/wonder-blocks-icon';
7
- import Link from '@khanacademy/wonder-blocks-link';
8
7
  import IconButton from '@khanacademy/wonder-blocks-icon-button';
8
+ import Link from '@khanacademy/wonder-blocks-link';
9
9
  import Spacing from '@khanacademy/wonder-blocks-spacing';
10
10
  import { LabelSmall } from '@khanacademy/wonder-blocks-typography';
11
11
 
@@ -62,6 +62,7 @@ const valuesForKind = kind => {
62
62
  const Banner = props => {
63
63
  const {
64
64
  actions,
65
+ "aria-label": ariaLabel,
65
66
  dismissAriaLabel,
66
67
  onDismiss,
67
68
  kind,
@@ -69,9 +70,6 @@ const Banner = props => {
69
70
  text,
70
71
  testId
71
72
  } = props;
72
- const layoutStyle = {
73
- borderRadius: layout && layout === "full-width" ? 0 : 4
74
- };
75
73
 
76
74
  const renderActions = () => {
77
75
  return actions == null ? void 0 : actions.filter(Boolean).map(action => {
@@ -107,14 +105,15 @@ const Banner = props => {
107
105
  };
108
106
 
109
107
  return React.createElement(View, {
110
- style: [styles.containerOuter, layoutStyle, {
108
+ style: [styles.containerOuter, layout === "floating" && styles.floatingBorder, {
111
109
  borderInlineStartColor: valuesForKind(kind).color
112
110
  }],
113
111
  role: valuesForKind(kind).role,
112
+ "aria-label": ariaLabel,
114
113
  "aria-live": valuesForKind(kind).ariaLive,
115
114
  testId: testId
116
115
  }, React.createElement(View, {
117
- style: [styles.backgroundColor, layoutStyle, {
116
+ style: [styles.backgroundColor, {
118
117
  backgroundColor: valuesForKind(kind).color
119
118
  }]
120
119
  }), React.createElement(View, {
@@ -211,6 +210,10 @@ const styles = StyleSheet.create({
211
210
  alignItems: "center",
212
211
  marginLeft: Spacing.xSmall_8,
213
212
  marginRight: Spacing.xSmall_8
213
+ },
214
+ floatingBorder: {
215
+ borderRadius: 4,
216
+ overflow: "hidden"
214
217
  }
215
218
  });
216
219