import { useTranslation } from "@plexswap/localization"; import { useCallback } from "react"; import { styled } from "styled-components"; import { ChevronDownIcon, ChevronUpIcon } from "../Svg"; import { Text } from "../Text"; export interface ExpandableSectionButtonProps { onClick?: () => void; expanded?: boolean; } const Wrapper = styled.div` display: flex; align-items: center; justify-content: center; cursor: pointer; svg { fill: ${({ theme }) => theme.colors.primary}; } `; const ExpandableSectionButton: React.FC> = ({ onClick, expanded = false, }) => { const { t } = useTranslation(); const handleOnClick = useCallback(() => onClick?.(), [onClick]); return ( {expanded ? t("Hide") : t("Details")} {expanded ? : } ); }; export default ExpandableSectionButton;