Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Rename Storage to Store.
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed Oct 2, 2018
1 parent d2b2d82 commit b3e5af7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const _sessionStore = new WebStore(window.sessionStorage);
* Data can be in memory, localStorage or sessionStorage.
* The data will be kept with the id as key.
*/
export default class Storage extends React.Component {
export default class Store extends React.Component {
constructor(props) {
super(props);

Expand Down Expand Up @@ -187,13 +187,13 @@ export default class Storage extends React.Component {
}
}

Storage.defaultProps = {
Store.defaultProps = {
storage_type: 'memory',
clear_data: false,
modified_timestamp: -1
};

Storage.propTypes = {
Store.propTypes = {
/**
* The key of the storage.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import DatePickerRange from './components/DatePickerRange.react';
import Upload from './components/Upload.react';
import Tabs from './components/Tabs.react';
import Tab from './components/Tab.react';
import Storage from './components/Storage.react';
import Store from './components/Store.react';

export {
Checklist,
Expand All @@ -42,5 +42,5 @@ export {
DatePickerSingle,
DatePickerRange,
Upload,
Storage
Store
};
8 changes: 4 additions & 4 deletions test/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,19 +1153,19 @@ def test_storage_component(self):
dummy_data = 'Hello dummy'

app.layout = html.Div([
dcc.Storage(id='storage',
dcc.Store(id='storage',
storage_type='local'),
html.Button('click me', id='btn'),
html.Button('clear', id='clear-btn'),
html.Button('set-init-storage',
id='set-init-storage'),
dcc.Storage(id='dummy',
dcc.Store(id='dummy',
storage_type='session',
data=dummy_data),
dcc.Storage(id='memory',
dcc.Store(id='memory',
storage_type='memory'),
html.Div(id='memory-output'),
dcc.Storage(id='initial-storage',
dcc.Store(id='initial-storage',
storage_type='session'),
html.Div(id='init-output')
])
Expand Down

0 comments on commit b3e5af7

Please sign in to comment.