import { ArrowRight2 } from 'iconsax-react'
import { type FC } from 'react'
import { Link } from 'react-router-dom'

type Props = {
    to: string
    label?: string
}

const BackButton: FC<Props> = ({ to, label = 'بازگشت' }) => (
    <Link
        to={to}
        className='flex items-center gap-1 text-sm text-[#8C90A3] hover:text-black shrink-0'
    >
        <ArrowRight2 size={18} color='currentColor' />
        {label}
    </Link>
)

export default BackButton
