Skip to content

Commit

Permalink
DIG-23009 Fix peerDeps to be able to bump to ffe-core 9 in other proj…
Browse files Browse the repository at this point in the history
…ects.

* Expand peerDep scope of `ffe-form` to include `5.x`.
* Remove peerDep to `ffe-core`.
* Fix lint error in `checkbox.js`.
* Remove prop warning while generating `example.html`.
* Remove old imports from `docs.js`.
  • Loading branch information
Henrik Hermansen committed Apr 21, 2017
1 parent 09f20c7 commit 51f03b4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 4.1.2
* Expand peerDep scope of `ffe-form` to include `5.x`.
* Remove peerDep to `ffe-core`.

## 4.1.1
* Update eslint to latest ffe config

Expand Down
6 changes: 3 additions & 3 deletions docs/docs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import CreateCheckbox, { MainExample, YellowExample, PurpleExample, WhiteExample } from './example-component';
import CreateCheckbox, { MainExample } from './example-component';

const example = (
<div>
Expand All @@ -23,7 +23,7 @@ const example = (
What colors do you like on unicorns?
</legend>
<div>
{ CreateCheckbox({ name: 'yellow-block', label: 'Yellow', checked: true }) }
{ CreateCheckbox({ name: 'yellow-block', label: 'Yellow', checked: true, onChange: () => {} }) }
</div>
<div>
{ CreateCheckbox({ name: 'purple-block', label: 'Purple' }) }
Expand All @@ -44,7 +44,7 @@ const example = (
<legend className="ffe-form-label">
Favorite unicorn foods?
</legend>
{ CreateCheckbox({ name: 'yellow-inline', label: 'Yellow', checked: true }) }
{ CreateCheckbox({ name: 'yellow-inline', label: 'Yellow', checked: true, onChange: () => {} }) }
{ CreateCheckbox({ name: 'purple-inline', label: 'Purple' }) }
{ CreateCheckbox({ name: 'white-inline', label: 'White' }) }
</fieldset>
Expand Down
1 change: 1 addition & 0 deletions docs/example-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const MainExample = (
checked={false}
name="Yellow"
label="Yellow"
onChange={ () => {} }
/>
);

Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ffe-checkbox-react",
"version": "4.1.1",
"version": "4.1.2",
"main": "lib/checkbox.js",
"scripts": {
"build": "babel -d lib/. --ignore=*.test.js src/. && npm run example",
Expand All @@ -16,8 +16,7 @@
"postpublish": "git tag ${npm_package_version} && git push --tags"
},
"peerDependencies": {
"ffe-core": "^8.1.0",
"ffe-form": "1.x || 2.x || 3.x || 4.x"
"ffe-form": "1.x - 5.x"
},
"dependencies": {
"classnames": "^2.2.5",
Expand All @@ -38,8 +37,8 @@
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^3.0.2",
"eslint-plugin-react": "^6.8.0",
"ffe-core": "^8.1.0",
"ffe-form": "^1.0.1",
"ffe-core": "^9.2.0",
"ffe-form": "^5.1.0",
"mocha": "^2.4.5",
"mocha-tap13": "0.0.3",
"nsp": "^2.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function CheckBox(props) {
label,
noMargins,
inline,
...rest,
...rest
} = props;

const id = `checkbox-${hash(rest.name)}`;
Expand Down

0 comments on commit 51f03b4

Please sign in to comment.