-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ffe-lists-react): Import ffe-lists-react
This commit imports, documents and rewrites ffe-lists-react. As an added feature, all components in ffe-lists-react will now start supporting passing of props and extra class names.
- Loading branch information
Kristofer Selbekk
committed
Jan 19, 2018
1 parent
26d7811
commit 8300ab0
Showing
32 changed files
with
395 additions
and
442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
git-tag-version=false | ||
package-lock=false |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,34 @@ | ||
{ | ||
"name": "ffe-lists-react", | ||
"version": "2.0.3", | ||
"description": "React implementation of ffe-lists", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"build": "babel -d lib/. --ignore=*.test.js src/.", | ||
"watch": "onchange 'src/**/*.js' -- npm run build", | ||
"lint": "eslint src/", | ||
"pretest": "npm run lint", | ||
"test": "mocha --require babel-register 'src/**/*.test.js'", | ||
"posttest": "nsp check", | ||
"start": "budo examples/lists.js --open --live --title \"FFE Lists React\" -- -t [ babelify --presets [ es2015 react ] ] -t node-lessify", | ||
"test:watch": "npm test -- -w", | ||
"prepublish": "npm run build", | ||
"has-published": "npm show . versions -s | grep -q ${npm_package_version}", | ||
"postpublish": "git tag ${npm_package_version} && git push --tags" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.4.5", | ||
"babel-eslint": "^6.0.4", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-preset-react": "^6.5.0", | ||
"babel-register": "^6.4.3", | ||
"babelify": "^7.2.0", | ||
"budo": "^9.2.1", | ||
"chai": "^3.5.0", | ||
"enzyme": "^2.3.0", | ||
"eslint": "^3.13.1", | ||
"eslint-config-ffe": "^6.0.0", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint-plugin-jsx-a11y": "^3.0.2", | ||
"eslint-plugin-react": "^6.9.0", | ||
"ffe-core": "^9.2.0", | ||
"ffe-lists": "^4.0.0", | ||
"mocha": "^2.5.3", | ||
"node-lessify": "^0.1.4", | ||
"nsp": "^2.2.0", | ||
"onchange": "^2.3.0", | ||
"react": "^15.0.1", | ||
"react-addons-create-fragment": "15.2.0", | ||
"react-addons-test-utils": "^15.1.0", | ||
"react-dom": "^15.0.1" | ||
}, | ||
"publishConfig": { | ||
"registry": "***REMOVED***" | ||
}, | ||
"files": [ | ||
"lib", | ||
"*.js" | ||
], | ||
"babel": { | ||
"presets": [ | ||
"es2015", | ||
"react" | ||
] | ||
}, | ||
"peerDependencies": { | ||
"ffe-lists": "3.x - 4.x" | ||
}, | ||
"dependencies": { | ||
"classnames": "^2.2.5", | ||
"nfe-hash": "^1.1.1", | ||
"prop-types": "*" | ||
} | ||
"name": "ffe-lists-react", | ||
"version": "2.0.3", | ||
"description": "React implementation of ffe-lists", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"build": "babel -d lib/. --ignore=*.test.js src/.", | ||
"lint": "eslint src/", | ||
"test": "npm run test:spec && npm run test:nsp", | ||
"test:spec": "jest", | ||
"test:nsp": "nsp check", | ||
"test:watch": "jest --watch" | ||
}, | ||
"devDependencies": { | ||
"enzyme": "^3.3.0", | ||
"enzyme-adapter-react-16": "^1.1.1", | ||
"ffe-lists": "^4.0.0", | ||
"jest": "^22.1.3", | ||
"nsp": "^2.2.0", | ||
"react": "^16.2.0", | ||
"react-dom": "^16.2.0" | ||
}, | ||
"files": ["lib", "*.js"], | ||
"peerDependencies": { | ||
"ffe-lists": "3.x - 4.x" | ||
}, | ||
"dependencies": { | ||
"classnames": "^2.2.5", | ||
"prop-types": "*" | ||
}, | ||
"jest": { | ||
"setupTestFrameworkScriptFile": "./test-setup.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import React from 'react'; | ||
import { array } from 'prop-types'; | ||
import { node, string } from 'prop-types'; | ||
import classNames from 'classnames'; | ||
|
||
export default function BulletList({ children }) { | ||
return <ul className="ffe-bullet-list"> | ||
{children} | ||
</ul>; | ||
} | ||
const BulletList = ({ className, ...rest }) => ( | ||
<ul className={classNames('ffe-bullet-list', className)} {...rest} /> | ||
); | ||
|
||
BulletList.propTypes = { | ||
children: array.isRequired, | ||
/** List items */ | ||
children: node.isRequired, | ||
/** Any extra classes */ | ||
className: string, | ||
}; | ||
|
||
export default BulletList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Brukes for å liste opp relaterte punkter. Rekkefølgen kan være helt tilfeldig. | ||
|
||
```js | ||
<div> | ||
<h4 className="ffe-h4">Våre forsikringer</h4> | ||
<BulletList> | ||
<li>Bilforsikring</li> | ||
<li>Reiseforsikring</li> | ||
<li>Innboforsikring</li> | ||
</BulletList> | ||
</div> | ||
``` |
Oops, something went wrong.