'use client' import type { FC } from 'react' import React, { useCallback } from 'react' import { RiCollapseDiagonalLine, RiExpandDiagonalLine, } from '@remixicon/react' type Props = { isExpand: boolean onExpandChange: (isExpand: boolean) => void } const ExpandBtn: FC = ({ isExpand, onExpandChange, }) => { const handleToggle = useCallback(() => { onExpandChange(!isExpand) }, [isExpand]) const Icon = isExpand ? RiCollapseDiagonalLine : RiExpandDiagonalLine return ( ) } export default React.memo(ExpandBtn)