-
-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16b6147
commit 913670f
Showing
3 changed files
with
136 additions
and
172 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Refactor Preference/Change Password from class to functional component. @Tishasoumya-02 |
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
41 changes: 41 additions & 0 deletions
41
packages/volto/src/components/manage/Preferences/ChangePassword.stories.jsx
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,41 @@ | ||
import { injectIntl } from 'react-intl'; | ||
import React from 'react'; | ||
import ChangePasswordComponent from './ChangePassword'; | ||
import { RealStoreWrapper as Wrapper } from '@plone/volto/storybook'; | ||
const IntlChangePasswordComponent = injectIntl(ChangePasswordComponent); | ||
|
||
function StoryComponent(args) { | ||
return ( | ||
<Wrapper | ||
customStore={{ | ||
intl: { | ||
locale: 'en', | ||
messages: {}, | ||
}, | ||
users: { | ||
update_password: { | ||
loading: false, | ||
}, | ||
}, | ||
}} | ||
> | ||
<div id="toolbar" style={{ display: 'none' }} /> | ||
<IntlChangePasswordComponent {...args} location={{ pathname: '/blog' }} /> | ||
</Wrapper> | ||
); | ||
} | ||
|
||
export const ChangePassword = StoryComponent.bind({}); | ||
|
||
export default { | ||
title: 'Public components/ChangePassword', | ||
component: ChangePassword, | ||
decorators: [ | ||
(Story) => ( | ||
<div className="ui segment form attached" style={{ width: '400px' }}> | ||
<Story /> | ||
</div> | ||
), | ||
], | ||
argTypes: {}, | ||
}; |