* WindowLevel preset code changes * Remove localStorage code as its already being saved and some small refactor on reducer/action * Creating unit tests for preferences reducer * Fix cypress after class naming change * Make hidden false as default for tab components * Remove addUserPreferences * Small refactor to use commandsManager from getCommandsModule instead of getting it from App.js
43 lines
861 B
JavaScript
43 lines
861 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { TabComponents } from '@ohif/ui';
|
|
|
|
// Tabs
|
|
import { HotkeysPreferences } from './HotkeysPreferences';
|
|
import { WindowLevelPreferences } from './WindowLevelPreferences';
|
|
import { GeneralPreferences } from './GeneralPreferences';
|
|
|
|
import './UserPreferences.styl';
|
|
|
|
const tabs = [
|
|
{
|
|
name: 'Hotkeys',
|
|
Component: HotkeysPreferences,
|
|
customProps: {},
|
|
},
|
|
{
|
|
name: 'General',
|
|
Component: GeneralPreferences,
|
|
customProps: {},
|
|
},
|
|
{
|
|
name: 'Window Level',
|
|
Component: WindowLevelPreferences,
|
|
customProps: {},
|
|
},
|
|
];
|
|
|
|
function UserPreferences({ hide }) {
|
|
const customProps = {
|
|
onClose: hide,
|
|
};
|
|
return <TabComponents tabs={tabs} customProps={customProps} />;
|
|
}
|
|
|
|
UserPreferences.propTypes = {
|
|
hide: PropTypes.func,
|
|
};
|
|
|
|
export { UserPreferences };
|