@khanacademy/wonder-blocks-banner
Advanced tools
Comparing version 0.0.0-PR2221-20240528155627 to 0.0.0-PR2221-20240621183514
# @khanacademy/wonder-blocks-banner | ||
## 0.0.0-PR2221-20240528155627 | ||
## 0.0.0-PR2221-20240621183514 | ||
@@ -8,4 +8,17 @@ ### Patch Changes | ||
- Updated dependencies [fa952500] | ||
- @khanacademy/wonder-blocks-icon-button@0.0.0-PR2221-20240528155627 | ||
- @khanacademy/wonder-blocks-icon-button@0.0.0-PR2221-20240621183514 | ||
## 3.1.1 | ||
### Patch Changes | ||
- Updated dependencies [16e1635a] | ||
- @khanacademy/wonder-blocks-icon-button@5.3.0 | ||
## 3.1.0 | ||
### Minor Changes | ||
- 9eecfc56: Adds optional `icon` prop for the `Banner` component. An icon asset (either imported from Phosphor or a imported custom icon) can be used. If not provided, default icons are used to represent the `kind` prop. | ||
## 3.0.43 | ||
@@ -12,0 +25,0 @@ |
import * as React from "react"; | ||
import { PhosphorIconAsset } from "@khanacademy/wonder-blocks-icon"; | ||
type ActionTriggerBase = { | ||
@@ -84,2 +85,12 @@ title: string; | ||
testId?: string; | ||
/** | ||
* An optional icon to display. This is a reference to the icon asset (imported as a | ||
* static SVG file). If not provided, a default icon will be used based on | ||
* the "kind" prop. | ||
* | ||
* It supports the following types: | ||
* - `PhosphorIconAsset`: a reference to a Phosphor SVG asset. | ||
* - `string`: an import referencing an arbitrary SVG file. | ||
*/ | ||
icon?: PhosphorIconAsset | string; | ||
}; | ||
@@ -86,0 +97,0 @@ /** |
@@ -54,3 +54,4 @@ import * as React from 'react'; | ||
text, | ||
testId | ||
testId, | ||
icon | ||
} = props; | ||
@@ -108,3 +109,3 @@ const renderActions = () => { | ||
}, React.createElement(PhosphorIcon, { | ||
icon: valuesForKind.icon, | ||
icon: icon || valuesForKind.icon, | ||
size: "medium", | ||
@@ -111,0 +112,0 @@ style: styles.icon, |
@@ -86,3 +86,4 @@ 'use strict'; | ||
text, | ||
testId | ||
testId, | ||
icon | ||
} = props; | ||
@@ -140,3 +141,3 @@ const renderActions = () => { | ||
}, React__namespace.createElement(wonderBlocksIcon.PhosphorIcon, { | ||
icon: valuesForKind.icon, | ||
icon: icon || valuesForKind.icon, | ||
size: "medium", | ||
@@ -143,0 +144,0 @@ style: styles.icon, |
{ | ||
"name": "@khanacademy/wonder-blocks-banner", | ||
"version": "0.0.0-PR2221-20240528155627", | ||
"version": "0.0.0-PR2221-20240621183514", | ||
"design": "v1", | ||
@@ -22,3 +22,3 @@ "description": "Banner components for Wonder Blocks.", | ||
"@khanacademy/wonder-blocks-icon": "^4.1.1", | ||
"@khanacademy/wonder-blocks-icon-button": "0.0.0-PR2221-20240528155627", | ||
"@khanacademy/wonder-blocks-icon-button": "0.0.0-PR2221-20240621183514", | ||
"@khanacademy/wonder-blocks-link": "^6.1.2", | ||
@@ -25,0 +25,0 @@ "@khanacademy/wonder-blocks-tokens": "^1.3.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128054
12
1392