Socket
Socket
Sign inDemoInstall

@hig/banner

Package Overview
Dependencies
Maintainers
5
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hig/banner - npm Package Compare versions

Comparing version 0.2.0-alpha.2cdf05db to 0.2.0-alpha.6c9fc4ae

8

package.json
{
"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} />

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc