import React from 'react'
import BreadcrumbsItem from './BreadcrumbsItem';

const Breadcrumbs = ({data, className}) => {
    return (
        <div className={['flex self-start text-slate-600 text-base font-medium', className].join(' ')}>
            {
                data.map((item, index)=>
                    <BreadcrumbsItem key={index} length={data.length} index={index+1} path={item.path}>{item.title}</BreadcrumbsItem>
                )
            }
        </div>
    )
}

export default Breadcrumbs;

