From 209b2b0c3fe799c83f52adf8b6cd9ab7796b23f0 Mon Sep 17 00:00:00 2001 From: sureshHARDIYA Date: Thu, 16 Mar 2017 10:03:41 +0100 Subject: [PATCH] update the notification and input component --- src/Notification/NotifyMesssage.js | 3 ++- src/index.js | 2 +- src/stories/Notification.js | 29 +++++++++++++++++++++++------ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/Notification/NotifyMesssage.js b/src/Notification/NotifyMesssage.js index 5b50ceb9..1237876c 100644 --- a/src/Notification/NotifyMesssage.js +++ b/src/Notification/NotifyMesssage.js @@ -7,7 +7,7 @@ export default class NotifyMesssage extends Component { icon: PropTypes.string, isSticky: PropTypes.bool, timeout: PropTypes.number, - type: PropTypes.oneOf(['info', 'success', 'danger', 'warning', false]), + type: PropTypes.oneOf(['info', 'success', 'danger', 'warning', 'primary', false]), onClick: PropTypes.func, // eslint-disable-line react/require-default-props } @@ -43,6 +43,7 @@ export default class NotifyMesssage extends Component { 'uk-notification-message-success': type === 'success', 'uk-notification-message-danger': type === 'danger', 'uk-notification-message-warning': type === 'warning', + 'uk-notification-message-primary': type === 'primary', }) const styles = [ { marginTop: '-64px' }, diff --git a/src/index.js b/src/index.js index e70c1c56..494ce6bb 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ export Button from './Button' export Dropdown from './Dropdown' export Modal from './Modal' -export Notify from './Notification' +export Notification from './Notification' export Input from './Input' diff --git a/src/stories/Notification.js b/src/stories/Notification.js index cbee26a0..12d89be1 100644 --- a/src/stories/Notification.js +++ b/src/stories/Notification.js @@ -63,7 +63,7 @@ class NotificationsContainer extends PureComponent { } } -// Notification.displayName = 'Notification' +Notification.displayName = 'Notification' storiesOf('Notification', module) .addWithInfo('Basic Usage', '', () => ( @@ -73,12 +73,29 @@ storiesOf('Notification', module) ), { header: false, inline: true, propTables: [Notification] }) .addWithInfo('Position', '', () => (
- - - - - + + + + + + +
+ ), { header: false, inline: true, propTables: [Notification] }) + .addWithInfo('Style', '', () => ( +
+ + + + + +
+ ), { header: false, inline: true, propTables: [Notification] }) + .addWithInfo('Component options', '', () => ( +
+ + +
), { header: false, inline: true, propTables: [Notification] })