@khanacademy/wonder-blocks-cell 2.1.0 → 2.2.0

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,11 @@
1
1
  # @khanacademy/wonder-blocks-cell
2
2
 
3
+ ## 2.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 35b9ef9c: Add target prop to cell.
8
+
3
9
  ## 2.1.0
4
10
 
5
11
  ### Minor Changes
package/dist/es/index.js CHANGED
@@ -144,7 +144,8 @@ const CellCore = props => {
144
144
  style,
145
145
  testId,
146
146
  "aria-label": ariaLabel,
147
- innerStyle
147
+ innerStyle,
148
+ target
148
149
  } = props;
149
150
 
150
151
  const renderCell = eventState => {
@@ -183,7 +184,8 @@ const CellCore = props => {
183
184
  onClick: onClick,
184
185
  href: href,
185
186
  hideDefaultFocusRing: true,
186
- "aria-label": ariaLabel ? ariaLabel : undefined
187
+ "aria-label": ariaLabel ? ariaLabel : undefined,
188
+ target: target
187
189
  }, eventState => renderCell(eventState));
188
190
  } // No click event attached, so just render the cell as-is.
189
191
 
package/dist/index.js CHANGED
@@ -309,7 +309,8 @@ const CellCore = props => {
309
309
  style,
310
310
  testId,
311
311
  "aria-label": ariaLabel,
312
- innerStyle
312
+ innerStyle,
313
+ target
313
314
  } = props;
314
315
 
315
316
  const renderCell = eventState => {
@@ -348,7 +349,8 @@ const CellCore = props => {
348
349
  onClick: onClick,
349
350
  href: href,
350
351
  hideDefaultFocusRing: true,
351
- "aria-label": ariaLabel ? ariaLabel : undefined
352
+ "aria-label": ariaLabel ? ariaLabel : undefined,
353
+ target: target
352
354
  }, eventState => renderCell(eventState));
353
355
  } // No click event attached, so just render the cell as-is.
354
356
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khanacademy/wonder-blocks-cell",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "design": "v1",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -130,6 +130,7 @@ const CellCore = (props: CellCoreProps): React.Node => {
130
130
  testId,
131
131
  "aria-label": ariaLabel,
132
132
  innerStyle,
133
+ target,
133
134
  } = props;
134
135
 
135
136
  const renderCell = (eventState?: ClickableState): React.Node => {
@@ -200,6 +201,7 @@ const CellCore = (props: CellCoreProps): React.Node => {
200
201
  href={href}
201
202
  hideDefaultFocusRing={true}
202
203
  aria-label={ariaLabel ? ariaLabel : undefined}
204
+ target={target}
203
205
  >
204
206
  {(eventState) => renderCell(eventState)}
205
207
  </Clickable>
package/src/util/types.js CHANGED
@@ -132,4 +132,12 @@ export type CellProps = {|
132
132
  * by default if react-router is present.
133
133
  */
134
134
  href?: string,
135
+
136
+ /**
137
+ * A target destination window for a link to open in. Should only be used
138
+ * when `href` is specified.
139
+ *
140
+ * TODO(WB-1262): only allow this prop when `href` is also set.t
141
+ */
142
+ target?: "_blank",
135
143
  |};