Move Toggle to components/ui

This commit is contained in:
Alex Gleason 2022-05-06 14:55:16 -05:00
parent eca6154cb9
commit 1a4991c6f9
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
5 changed files with 5 additions and 5 deletions

View File

@ -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';

View File

@ -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

View File

@ -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';

View File

@ -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';

View File

@ -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';