mirror of https://github.com/mue/mue.git
Refactor(structure): Component exports and imports
This commit is contained in:
parent
682dee83ab
commit
ff68c7e599
|
@ -58,4 +58,4 @@ class Checkbox extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
export default Checkbox;
|
||||
export { Checkbox as default, Checkbox };
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export * from './Checkbox';
|
|
@ -0,0 +1 @@
|
|||
export * from './ChipSelect';
|
|
@ -73,4 +73,4 @@ class Dropdown extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
export default Dropdown;
|
||||
export { Dropdown as default, Dropdown };
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export * from './Dropdown';
|
|
@ -0,0 +1 @@
|
|||
export * from './FileUpload';
|
|
@ -84,4 +84,4 @@ class Radio extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
export default Radio;
|
||||
export { Radio as default, Radio };
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export * from './Radio';
|
|
@ -85,4 +85,4 @@ class SliderComponent extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
export default SliderComponent;
|
||||
export { SliderComponent as default, SliderComponent as Slider };
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export * from './Slider';
|
|
@ -0,0 +1 @@
|
|||
export * from './Switch';
|
|
@ -81,4 +81,4 @@ class Text extends PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
export default Text;
|
||||
export { Text as default, Text };
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export * from './Text';
|
|
@ -0,0 +1,8 @@
|
|||
export * from './Checkbox';
|
||||
export * from './ChipSelect';
|
||||
export * from './Dropdown';
|
||||
export * from './FileUpload';
|
||||
export * from './Radio';
|
||||
export * from './Slider';
|
||||
export * from './Switch';
|
||||
export * from './Text';
|
|
@ -0,0 +1 @@
|
|||
export * from './Settings';
|
|
@ -13,7 +13,7 @@ export const CustomActions = ({ children }) => {
|
|||
return children;
|
||||
};
|
||||
|
||||
export default function Header(props) {
|
||||
function Header(props) {
|
||||
const [setting, setSetting] = useState(localStorage.getItem(props.setting) === 'true');
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -88,5 +88,4 @@ export default function Header(props) {
|
|||
);
|
||||
}
|
||||
|
||||
// Remove the export statement for customActions
|
||||
// export { customActions };
|
||||
export { Header as default, Header };
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export * from './Header';
|
|
@ -0,0 +1 @@
|
|||
export * from './SettingsItem';
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useState } from 'react';
|
||||
import { Row, Content, Action } from '../../../../components/Layout/Settings/Item/SettingsItem';
|
||||
import { Row, Content, Action } from '../Item/SettingsItem';
|
||||
import variables from 'config/variables';
|
||||
import Slider from '../../../../components/Form/Settings/Slider/Slider';
|
||||
import Slider from '../../../Form/Settings/Slider/Slider';
|
||||
|
||||
import { values } from 'modules/helpers/settings/modals';
|
||||
import EventBus from 'modules/helpers/eventbus';
|
|
@ -0,0 +1 @@
|
|||
export * from './PreferencesWrapper';
|
|
@ -0,0 +1,4 @@
|
|||
export * from './Header';
|
||||
export * from './Item';
|
||||
export * from './PreferencesWrapper';
|
||||
export * from './Section';
|
|
@ -1 +1,2 @@
|
|||
export * from './Settings';
|
||||
export * from './WidgetsLayout';
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
} from 'react-icons/md';
|
||||
import Modal from 'react-modal';
|
||||
|
||||
import Header from '../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import { Button } from 'components/Elements';
|
||||
|
||||
import { install, uninstall } from 'modules/helpers/marketplace';
|
||||
|
|
|
@ -9,7 +9,7 @@ import FileUpload from '../../../../../components/Form/Settings/FileUpload/FileU
|
|||
import Item from '../Item';
|
||||
import Items from '../Items';
|
||||
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
import Header, { CustomActions } from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header, CustomActions } from 'components/Layout/Settings';
|
||||
import { Button } from 'components/Elements';
|
||||
|
||||
import { install, uninstall, urlParser } from 'modules/helpers/marketplace';
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
import Item from '../Item';
|
||||
import Items from '../Items';
|
||||
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import { Button } from 'components/Elements';
|
||||
|
||||
import { install, urlParser, uninstall } from 'modules/helpers/marketplace';
|
||||
|
|
|
@ -15,7 +15,7 @@ import Text from '../../../../../components/Form/Settings/Text/Text';
|
|||
import Switch from '../../../../../components/Form/Settings/Switch/Switch';
|
||||
import ResetModal from '../ResetModal';
|
||||
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
|
||||
import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem';
|
||||
import Section from '../../../../../components/Layout/Settings/Section/Section';
|
||||
|
|
|
@ -2,16 +2,8 @@ import { memo, useState } from 'react';
|
|||
|
||||
import variables from 'config/variables';
|
||||
|
||||
import Checkbox from '../../../../../components/Form/Settings/Checkbox/Checkbox';
|
||||
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
import Radio from '../../../../../components/Form/Settings/Radio/Radio';
|
||||
import Slider from '../../../../../components/Form/Settings/Slider/Slider';
|
||||
import Text from '../../../../../components/Form/Settings/Text/Text';
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
|
||||
import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem';
|
||||
|
||||
import Section from '../../../../../components/Layout/Settings/Section/Section';
|
||||
import { Checkbox, Dropdown, Radio, Slider, Text } from 'components/Form/Settings';
|
||||
import { Header, Section, Row, Content, Action } from 'components/Layout/Settings';
|
||||
|
||||
import { MdAccessibility } from 'react-icons/md';
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import variables from 'config/variables';
|
||||
import { useState } from 'react';
|
||||
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import Checkbox from '../../../../../components/Form/Settings/Checkbox/Checkbox';
|
||||
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
|
||||
import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem';
|
||||
import PreferencesWrapper from '../PreferencesWrapper';
|
||||
import PreferencesWrapper from '../../../../../components/Layout/Settings/PreferencesWrapper/PreferencesWrapper';
|
||||
|
||||
export default function Date() {
|
||||
const [dateType, setDateType] = useState(localStorage.getItem('dateType') || 'long');
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import variables from 'config/variables';
|
||||
import { useState } from 'react';
|
||||
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import Checkbox from '../../../../../components/Form/Settings/Checkbox/Checkbox';
|
||||
import Switch from '../../../../../components/Form/Settings/Switch/Switch';
|
||||
import Text from '../../../../../components/Form/Settings/Text/Text';
|
||||
|
||||
import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem';
|
||||
import PreferencesWrapper from '../PreferencesWrapper';
|
||||
import PreferencesWrapper from '../../../../../components/Layout/Settings/PreferencesWrapper/PreferencesWrapper';
|
||||
|
||||
const GreetingSettings = () => {
|
||||
const [birthday, setBirthday] = useState(
|
||||
|
|
|
@ -5,10 +5,10 @@ import { toast } from 'react-toastify';
|
|||
import { TextareaAutosize } from '@mui/material';
|
||||
|
||||
import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem';
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
import PreferencesWrapper from '../PreferencesWrapper';
|
||||
import PreferencesWrapper from '../../../../../components/Layout/Settings/PreferencesWrapper/PreferencesWrapper';
|
||||
|
||||
export default class Message extends PureComponent {
|
||||
constructor() {
|
||||
|
|
|
@ -12,7 +12,7 @@ import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown'
|
|||
import { Button } from 'components/Elements';
|
||||
|
||||
import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem';
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import { getTitleFromUrl, isValidUrl } from 'modules/helpers/settings/modals';
|
||||
import QuickLink from './quicklinks/QuickLink';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import variables from 'config/variables';
|
||||
import { PureComponent, createRef } from 'react';
|
||||
import { MdAddLink, MdLinkOff } from 'react-icons/md';
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import Checkbox from '../../../../../components/Form/Settings/Checkbox/Checkbox';
|
||||
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
import { Button } from 'components/Elements';
|
||||
|
@ -13,7 +13,7 @@ import AddModal from './quicklinks/AddModal';
|
|||
import EventBus from 'modules/helpers/eventbus';
|
||||
import QuickLink from './quicklinks/QuickLink';
|
||||
import { getTitleFromUrl, isValidUrl } from 'modules/helpers/settings/modals';
|
||||
import PreferencesWrapper from '../PreferencesWrapper';
|
||||
import PreferencesWrapper from '../../../../../components/Layout/Settings/PreferencesWrapper/PreferencesWrapper';
|
||||
|
||||
export default class QuickLinks extends PureComponent {
|
||||
constructor() {
|
||||
|
|
|
@ -3,13 +3,13 @@ import React, { PureComponent } from 'react';
|
|||
import { MdCancel, MdAdd, MdSource, MdOutlineFormatQuote } from 'react-icons/md';
|
||||
import TextareaAutosize from '@mui/material/TextareaAutosize';
|
||||
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import Checkbox from '../../../../../components/Form/Settings/Checkbox/Checkbox';
|
||||
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
|
||||
import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem';
|
||||
import Section from '../../../../../components/Layout/Settings/Section/Section';
|
||||
import PreferencesWrapper from '../PreferencesWrapper';
|
||||
import PreferencesWrapper from '../../../../../components/Layout/Settings/PreferencesWrapper/PreferencesWrapper';
|
||||
|
||||
import { toast } from 'react-toastify';
|
||||
import EventBus from 'modules/helpers/eventbus';
|
||||
|
|
|
@ -3,7 +3,7 @@ import { PureComponent } from 'react';
|
|||
import { toast } from 'react-toastify';
|
||||
import { MenuItem, TextField } from '@mui/material';
|
||||
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
import Checkbox from '../../../../../components/Form/Settings/Checkbox/Checkbox';
|
||||
|
||||
|
@ -12,7 +12,7 @@ import { Row, Content, Action } from '../../../../../components/Layout/Settings/
|
|||
import EventBus from 'modules/helpers/eventbus';
|
||||
|
||||
import searchEngines from 'features/widgets/search/search_engines.json';
|
||||
import PreferencesWrapper from '../PreferencesWrapper';
|
||||
import PreferencesWrapper from '../../../../../components/Layout/Settings/PreferencesWrapper/PreferencesWrapper';
|
||||
|
||||
export default class SearchSettings extends PureComponent {
|
||||
constructor() {
|
||||
|
|
|
@ -6,7 +6,7 @@ import { FaTrophy } from 'react-icons/fa';
|
|||
import { toast } from 'react-toastify';
|
||||
|
||||
import { Button } from 'components/Elements';
|
||||
import Header, { CustomActions } from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header, CustomActions } from 'components/Layout/Settings';
|
||||
|
||||
import { saveFile } from 'modules/helpers/settings/modals';
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import variables from 'config/variables';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import Checkbox from '../../../../../components/Form/Settings/Checkbox/Checkbox';
|
||||
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
import Radio from '../../../../../components/Form/Settings/Radio/Radio';
|
||||
|
||||
import PreferencesWrapper from '../PreferencesWrapper';
|
||||
import PreferencesWrapper from '../../../../../components/Layout/Settings/PreferencesWrapper/PreferencesWrapper';
|
||||
import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem';
|
||||
|
||||
import { MdRefresh } from 'react-icons/md';
|
||||
|
|
|
@ -3,13 +3,13 @@ import { PureComponent } from 'react';
|
|||
|
||||
import { MdAutoAwesome } from 'react-icons/md';
|
||||
|
||||
import Header from '../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import Radio from '../../../../../components/Form/Settings/Radio/Radio';
|
||||
import Dropdown from '../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
import Checkbox from '../../../../../components/Form/Settings/Checkbox/Checkbox';
|
||||
import { TextField } from '@mui/material';
|
||||
|
||||
import PreferencesWrapper from '../PreferencesWrapper';
|
||||
import PreferencesWrapper from '../../../../../components/Layout/Settings/PreferencesWrapper/PreferencesWrapper';
|
||||
|
||||
import { Row, Content, Action } from '../../../../../components/Layout/Settings/Item/SettingsItem';
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { PureComponent } from 'react';
|
|||
import { MenuItem } from '@mui/material';
|
||||
import { MdSource, MdOutlineKeyboardArrowRight, MdOutlineAutoAwesome } from 'react-icons/md';
|
||||
|
||||
import Header from '../../../../../../components/Layout/Settings/Header/Header';
|
||||
import { Header } from 'components/Layout/Settings';
|
||||
import Checkbox from '../../../../../../components/Form/Settings/Checkbox/Checkbox';
|
||||
import ChipSelect from '../../../../../../components/Form/Settings/ChipSelect/ChipSelect';
|
||||
import Dropdown from '../../../../../../components/Form/Settings/Dropdown/Dropdown';
|
||||
|
|
Loading…
Reference in New Issue