Move Accordion into Component UI
This commit is contained in:
parent
53feace383
commit
a559ed72c9
|
@ -20,6 +20,10 @@ interface IAccordion {
|
||||||
onToggle?: (value: boolean) => void,
|
onToggle?: (value: boolean) => void,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accordion
|
||||||
|
* An accordion is a vertically stacked group of collapsible sections.
|
||||||
|
*/
|
||||||
const Accordion: React.FC<IAccordion> = ({ headline, children, menu, expanded = false, onToggle = () => {} }) => {
|
const Accordion: React.FC<IAccordion> = ({ headline, children, menu, expanded = false, onToggle = () => {} }) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
export { default as Accordion } from './accordion/accordion';
|
||||||
export { default as Avatar } from './avatar/avatar';
|
export { default as Avatar } from './avatar/avatar';
|
||||||
export { default as Banner } from './banner/banner';
|
export { default as Banner } from './banner/banner';
|
||||||
export { default as Button } from './button/button';
|
export { default as Button } from './button/button';
|
||||||
|
|
|
@ -7,9 +7,8 @@ import { deactivateUserModal, deleteUserModal } from 'soapbox/actions/moderation
|
||||||
import snackbar from 'soapbox/actions/snackbar';
|
import snackbar from 'soapbox/actions/snackbar';
|
||||||
import Avatar from 'soapbox/components/avatar';
|
import Avatar from 'soapbox/components/avatar';
|
||||||
import HoverRefWrapper from 'soapbox/components/hover-ref-wrapper';
|
import HoverRefWrapper from 'soapbox/components/hover-ref-wrapper';
|
||||||
import { Button, HStack } from 'soapbox/components/ui';
|
import { Accordion, Button, HStack } from 'soapbox/components/ui';
|
||||||
import DropdownMenu from 'soapbox/containers/dropdown-menu-container';
|
import DropdownMenu from 'soapbox/containers/dropdown-menu-container';
|
||||||
import Accordion from 'soapbox/features/ui/components/accordion';
|
|
||||||
import { useAppDispatch, useAppSelector } from 'soapbox/hooks';
|
import { useAppDispatch, useAppSelector } from 'soapbox/hooks';
|
||||||
import { makeGetReport } from 'soapbox/selectors';
|
import { makeGetReport } from 'soapbox/selectors';
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
import { defineMessages, useIntl, FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
import { Column, Stack } from 'soapbox/components/ui';
|
import { Accordion, Column, Stack } from 'soapbox/components/ui';
|
||||||
import Accordion from 'soapbox/features/ui/components/accordion';
|
|
||||||
import { useAppSelector } from 'soapbox/hooks';
|
import { useAppSelector } from 'soapbox/hooks';
|
||||||
|
|
||||||
import SiteWallet from './components/site-wallet';
|
import SiteWallet from './components/site-wallet';
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
||||||
import { defineMessages, useIntl } from 'react-intl';
|
import { defineMessages, useIntl } from 'react-intl';
|
||||||
|
|
||||||
import ScrollableList from 'soapbox/components/scrollable-list';
|
import ScrollableList from 'soapbox/components/scrollable-list';
|
||||||
import Accordion from 'soapbox/features/ui/components/accordion';
|
import { Accordion } from 'soapbox/components/ui';
|
||||||
import { useAppSelector } from 'soapbox/hooks';
|
import { useAppSelector } from 'soapbox/hooks';
|
||||||
import { makeGetHosts } from 'soapbox/selectors';
|
import { makeGetHosts } from 'soapbox/selectors';
|
||||||
import { federationRestrictionsDisclosed } from 'soapbox/utils/state';
|
import { federationRestrictionsDisclosed } from 'soapbox/utils/state';
|
||||||
|
|
|
@ -7,8 +7,7 @@ import { connectPublicStream } from 'soapbox/actions/streaming';
|
||||||
import { expandPublicTimeline } from 'soapbox/actions/timelines';
|
import { expandPublicTimeline } from 'soapbox/actions/timelines';
|
||||||
import PullToRefresh from 'soapbox/components/pull-to-refresh';
|
import PullToRefresh from 'soapbox/components/pull-to-refresh';
|
||||||
import SubNavigation from 'soapbox/components/sub-navigation';
|
import SubNavigation from 'soapbox/components/sub-navigation';
|
||||||
import { Column } from 'soapbox/components/ui';
|
import { Accordion, Column } from 'soapbox/components/ui';
|
||||||
import Accordion from 'soapbox/features/ui/components/accordion';
|
|
||||||
import { useAppDispatch, useAppSelector, useSettings } from 'soapbox/hooks';
|
import { useAppDispatch, useAppSelector, useSettings } from 'soapbox/hooks';
|
||||||
|
|
||||||
import PinnedHostsPicker from '../remote-timeline/components/pinned-hosts-picker';
|
import PinnedHostsPicker from '../remote-timeline/components/pinned-hosts-picker';
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { uploadMedia } from 'soapbox/actions/media';
|
||||||
import snackbar from 'soapbox/actions/snackbar';
|
import snackbar from 'soapbox/actions/snackbar';
|
||||||
import List, { ListItem } from 'soapbox/components/list';
|
import List, { ListItem } from 'soapbox/components/list';
|
||||||
import {
|
import {
|
||||||
|
Accordion,
|
||||||
Column,
|
Column,
|
||||||
CardHeader,
|
CardHeader,
|
||||||
CardTitle,
|
CardTitle,
|
||||||
|
@ -24,8 +25,6 @@ import ThemeSelector from 'soapbox/features/ui/components/theme-selector';
|
||||||
import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
|
import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
|
||||||
import { normalizeSoapboxConfig } from 'soapbox/normalizers';
|
import { normalizeSoapboxConfig } from 'soapbox/normalizers';
|
||||||
|
|
||||||
import Accordion from '../ui/components/accordion';
|
|
||||||
|
|
||||||
import ColorWithPicker from './components/color-with-picker';
|
import ColorWithPicker from './components/color-with-picker';
|
||||||
import CryptoAddressInput from './components/crypto-address-input';
|
import CryptoAddressInput from './components/crypto-address-input';
|
||||||
import FooterLinkInput from './components/footer-link-input';
|
import FooterLinkInput from './components/footer-link-input';
|
||||||
|
|
Loading…
Reference in New Issue