@hig/banner
Advanced tools
Comparing version 0.2.0-alpha.2cdf05db to 0.2.0-alpha.6c9fc4ae
{ | ||
"name": "@hig/banner", | ||
"version": "0.2.0-alpha.2cdf05db", | ||
"version": "0.2.0-alpha.6c9fc4ae", | ||
"description": "HIG Banner", | ||
@@ -11,4 +11,4 @@ "author": "Autodesk Inc.", | ||
"devDependencies": { | ||
"@hig/scripts": "0.2.0-alpha.2cdf05db", | ||
"@hig/styles": "0.1.0-alpha.2cdf05db" | ||
"@hig/scripts": "0.2.0-alpha.6c9fc4ae", | ||
"@hig/styles": "0.1.0-alpha.6c9fc4ae" | ||
}, | ||
@@ -23,4 +23,4 @@ "peerDependencies": { | ||
"dependencies": { | ||
"hig-react": "0.29.0-alpha.2cdf05db" | ||
"hig-react": "0.29.0-alpha.6c9fc4ae" | ||
} | ||
} |
@@ -13,7 +13,6 @@ import React from "react"; | ||
type, | ||
placement, | ||
children, | ||
label, | ||
dismissButtonTitle, | ||
onDismiss, | ||
children, | ||
...otherProps | ||
@@ -23,18 +22,17 @@ } = props; | ||
return { | ||
...otherProps, | ||
type: select("Type", Banner.AVAILABLE_TYPES, type), | ||
placement: select("Placement", Banner.AVAILABLE_PLACEMENTS, placement), | ||
children: text("Message", children), | ||
label: text("Label", label), | ||
labelledBy: "unique-id", | ||
dismissButtonTitle: text("Dismiss title", dismissButtonTitle), | ||
onDismiss: action("Banner dismissed", onDismiss), | ||
isVisible: true, | ||
children: text("Message", children), | ||
...otherProps | ||
onDismiss: action("Banner dismissed", onDismiss) | ||
}; | ||
} | ||
function BannerDemo({ children, ...props }) { | ||
function BannerDemo(props) { | ||
const { children, ...otherProps } = getBannerKnobs(props); | ||
return ( | ||
<div style={{ marginBottom: "15px" }}> | ||
<Banner {...getBannerKnobs(props)}>{children}</Banner> | ||
<Banner {...otherProps}>{children}</Banner> | ||
</div> | ||
@@ -48,4 +46,2 @@ ); | ||
const bannerStories = storiesOf("Banner", module); | ||
const stories = [ | ||
@@ -60,6 +56,5 @@ { | ||
type: Banner.types.WARNING, | ||
label: "PROCESS COMPLETE", | ||
// eslint-disable-next-line max-len | ||
children: | ||
"Changes have been made to you document. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.", | ||
// eslint-disable-next-line max-len | ||
"PROCESS COMPLETE: Changes have been made to you document. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam.", | ||
/** @todo Cleanup/refactor */ | ||
@@ -90,4 +85,6 @@ actions: ({ isWrappingActions }) => ( | ||
const bannerStories = storiesOf("Banner", module); | ||
stories.forEach(({ description, props }) => { | ||
bannerStories.add(description, () => <BannerStory props={props} />); | ||
}); |
@@ -52,5 +52,3 @@ import React from "react"; | ||
const hasLabel = !!label; | ||
const hasActions = React.Children.count(actions) > 0; | ||
const wrapperLabelledBy = hasLabel ? labelledBy : undefined; | ||
@@ -62,3 +60,4 @@ return ( | ||
isWrappingContent={isWrappingContent} | ||
labelledBy={wrapperLabelledBy} | ||
label={label} | ||
labelledBy={labelledBy} | ||
> | ||
@@ -65,0 +64,0 @@ <Icon type={type} /> |
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
44060
920
+ Addedhig-interface@0.2.0-alpha.6c9fc4ae(transitive)
+ Addedhig-react@0.29.0-alpha.6c9fc4ae(transitive)
+ Addedhig-vanilla@0.2.0-alpha.6c9fc4ae(transitive)
- Removedhig-interface@0.2.0-alpha.2cdf05db(transitive)
- Removedhig-react@0.29.0-alpha.2cdf05db(transitive)
- Removedhig-vanilla@0.2.0-alpha.2cdf05db(transitive)