@govuk-react/icons
Advanced tools
Comparing version 0.2.0 to 0.2.1
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import SVG from '.'; | ||
storiesOf('Search', module).add('Search', function () { | ||
return React.createElement(SVG, { | ||
title: "example" | ||
}, "SVG example"); | ||
import { withKnobs, color, text, object } from '@storybook/addon-knobs/react'; | ||
import SVGBase from '.'; | ||
var stories = storiesOf('Icons', module); | ||
stories.addDecorator(withKnobs); | ||
stories.add('SVGBase', function () { | ||
var fill = color('fill', 'transparent'); | ||
var stroke = color('stroke', 'orange'); | ||
var viewBox = text('viewBox', '0 0 500 500'); | ||
return React.createElement(SVGBase, { | ||
viewBox: viewBox, | ||
title: "Example of SVGBase", | ||
fill: fill, | ||
stroke: stroke | ||
}, React.createElement("polygon", { | ||
points: "250,60 100,400 400,400" | ||
})); | ||
}); | ||
//# sourceMappingURL=stories.js.map |
@@ -7,2 +7,4 @@ "use strict"; | ||
var _react3 = require("@storybook/addon-knobs/react"); | ||
var _ = _interopRequireDefault(require(".")); | ||
@@ -12,7 +14,17 @@ | ||
(0, _react2.storiesOf)('Search', module).add('Search', function () { | ||
var stories = (0, _react2.storiesOf)('Icons', module); | ||
stories.addDecorator(_react3.withKnobs); | ||
stories.add('SVGBase', function () { | ||
var fill = (0, _react3.color)('fill', 'transparent'); | ||
var stroke = (0, _react3.color)('stroke', 'orange'); | ||
var viewBox = (0, _react3.text)('viewBox', '0 0 500 500'); | ||
return _react.default.createElement(_.default, { | ||
title: "example" | ||
}, "SVG example"); | ||
viewBox: viewBox, | ||
title: "Example of SVGBase", | ||
fill: fill, | ||
stroke: stroke | ||
}, _react.default.createElement("polygon", { | ||
points: "250,60 100,400 400,400" | ||
})); | ||
}); | ||
//# sourceMappingURL=stories.js.map |
{ | ||
"name": "@govuk-react/icons", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"dependencies": { | ||
"@govuk-react/constants": "^0.2.0", | ||
"@govuk-react/constants": "^0.2.1", | ||
"govuk-colours": "^1.0.3" | ||
@@ -7,0 +7,0 @@ }, |
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withKnobs, color, text, object } from '@storybook/addon-knobs/react'; | ||
import SVG from '.'; | ||
import SVGBase from '.'; | ||
storiesOf('Search', module).add('Search', () => ( | ||
<SVG title="example">SVG example</SVG> | ||
)); | ||
const stories = storiesOf('Icons', module); | ||
stories.addDecorator(withKnobs); | ||
stories.add('SVGBase', () => { | ||
const fill = color('fill', 'transparent'); | ||
const stroke = color('stroke', 'orange'); | ||
const viewBox = text('viewBox', '0 0 500 500'); | ||
return ( | ||
<SVGBase viewBox={viewBox} title="Example of SVGBase" fill={fill} stroke={stroke}> | ||
<polygon points="250,60 100,400 400,400" /> | ||
</SVGBase> | ||
); | ||
}); | ||
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
121494
1298