Move Toggle to components/ui
This commit is contained in:
parent
eca6154cb9
commit
1a4991c6f9
|
@ -30,5 +30,6 @@ export { default as Stack } from './stack/stack';
|
|||
export { default as Tabs } from './tabs/tabs';
|
||||
export { default as Text } from './text/text';
|
||||
export { default as Textarea } from './textarea/textarea';
|
||||
export { default as Toggle } from './toggle/toggle';
|
||||
export { default as Tooltip } from './tooltip/tooltip';
|
||||
export { default as Widget } from './widget/widget';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react';
|
||||
import ReactToggle, { ToggleProps } from 'react-toggle';
|
||||
|
||||
/** Wrapper around react-toggle. */
|
||||
/** A glorified checkbox. Wrapper around react-toggle. */
|
||||
const Toggle: React.FC<ToggleProps> = ({ icons = false, ...rest }) => {
|
||||
return (
|
||||
<ReactToggle
|
|
@ -5,12 +5,11 @@ import { updateNotificationSettings } from 'soapbox/actions/accounts';
|
|||
import { patchMe } from 'soapbox/actions/me';
|
||||
import snackbar from 'soapbox/actions/snackbar';
|
||||
import List, { ListItem } from 'soapbox/components/list';
|
||||
import Toggle from 'soapbox/components/toggle';
|
||||
import { useAppSelector, useAppDispatch, useOwnAccount, useFeatures } from 'soapbox/hooks';
|
||||
import { normalizeAccount } from 'soapbox/normalizers';
|
||||
import resizeImage from 'soapbox/utils/resize_image';
|
||||
|
||||
import { Button, Column, Form, FormActions, FormGroup, Input, Textarea, HStack } from '../../components/ui';
|
||||
import { Button, Column, Form, FormActions, FormGroup, Input, Textarea, HStack, Toggle } from '../../components/ui';
|
||||
import Streamfield, { StreamfieldComponent } from '../../components/ui/streamfield/streamfield';
|
||||
|
||||
import ProfilePreview from './components/profile-preview';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
|
||||
import Toggle from 'soapbox/components/toggle';
|
||||
import { Toggle } from 'soapbox/components/ui';
|
||||
|
||||
import type { Map as ImmutableMap } from 'immutable';
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ import { updateConfig } from 'soapbox/actions/admin';
|
|||
import { uploadMedia } from 'soapbox/actions/media';
|
||||
import snackbar from 'soapbox/actions/snackbar';
|
||||
import List, { ListItem } from 'soapbox/components/list';
|
||||
import Toggle from 'soapbox/components/toggle';
|
||||
import {
|
||||
Column,
|
||||
CardHeader,
|
||||
|
@ -17,6 +16,7 @@ import {
|
|||
Input,
|
||||
Textarea,
|
||||
Button,
|
||||
Toggle,
|
||||
} from 'soapbox/components/ui';
|
||||
import Streamfield from 'soapbox/components/ui/streamfield/streamfield';
|
||||
import ThemeSelector from 'soapbox/features/ui/components/theme-selector';
|
||||
|
|
Loading…
Reference in New Issue