Skip to content

Commit

Permalink
* Use PropTypes from prop-types package
Browse files Browse the repository at this point in the history
  • Loading branch information
orhels committed Sep 5, 2017
1 parent f58b50c commit 5f610d3
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 18 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## Version 1.1.5
* Use PropTypes from prop-types package

## Version 1.1.4
* Removed peerDep on ffe-core

Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ffe-system-message-react",
"version": "1.1.4",
"version": "1.1.5",
"description": "SpareBank 1 System Message komponent",
"main": "lib/index.js",
"scripts": {
Expand All @@ -25,6 +25,9 @@
"lint",
"test"
],
"dependencies": {
"prop-types": "*"
},
"peerDependencies": {
"ffe-icons-react": "2.x",
"ffe-system-message": "1.x || 2.x"
Expand Down
11 changes: 6 additions & 5 deletions src/base.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import { node, object, oneOf } from 'prop-types';
import { findDOMNode } from 'react-dom';

import KryssIkon from 'ffe-icons-react/kryss-ikon';
Expand Down Expand Up @@ -61,8 +62,8 @@ export default class Base extends Component {
}

Base.propTypes = {
children: PropTypes.node.isRequired,
icon: PropTypes.node.isRequired,
modifier: PropTypes.oneOf(['error', 'info', 'success', 'news']),
style: PropTypes.object,
children: node.isRequired,
icon: node.isRequired,
modifier: oneOf(['error', 'info', 'success', 'news']),
style: object,
};
7 changes: 4 additions & 3 deletions src/system-error-message.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import { node, object } from 'prop-types';

import InfoSirkelIkon from 'ffe-icons-react/info-sirkel-ikon';

Expand All @@ -16,6 +17,6 @@ export default function SystemErrorMessage({ style, children }) {
}

SystemErrorMessage.propTypes = {
children: PropTypes.node.isRequired,
style: PropTypes.object,
children: node.isRequired,
style: object,
};
7 changes: 4 additions & 3 deletions src/system-info-message.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import { node, object } from 'prop-types';

import InfoSirkelIkon from 'ffe-icons-react/info-sirkel-ikon';

Expand All @@ -13,6 +14,6 @@ export default function SystemInfoMessage({ style, children }) {
}

SystemInfoMessage.propTypes = {
children: PropTypes.node.isRequired,
style: PropTypes.object,
children: node.isRequired,
style: object,
};
7 changes: 4 additions & 3 deletions src/system-news-message.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import { node, object } from 'prop-types';

import InfoSirkelIkon from 'ffe-icons-react/info-sirkel-ikon';

Expand All @@ -13,6 +14,6 @@ export default function SystemNewsMessage({ style, children }) {
}

SystemNewsMessage.propTypes = {
children: PropTypes.node.isRequired,
style: PropTypes.object,
children: node.isRequired,
style: object,
};
7 changes: 4 additions & 3 deletions src/system-success-message.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import React from 'react';
import { node, object } from 'prop-types';

import HakeSirkelIkon from 'ffe-icons-react/hake-sirkel-ikon';

Expand All @@ -13,6 +14,6 @@ export default function SystemSuccessMessage({ style, children }) {
}

SystemSuccessMessage.propTypes = {
children: PropTypes.node.isRequired,
style: PropTypes.object,
children: node.isRequired,
style: object,
};

0 comments on commit 5f610d3

Please sign in to comment.