croz-ltd / tiller

🔖 Tiller DS is an open-source UI library that provides a range of visual, functional components and patterns that speed up design and development.
https://croz-ltd.github.io/tiller
Apache License 2.0
28 stars 1 forks source link

Breadcrumbs render caret between non rendered elements #241

Closed djovic-croz closed 7 months ago

djovic-croz commented 7 months ago

Basic information

Bug description

When rendering optional Breadcrumbs elements caret is rendered between non-rendered elements

Steps to reproduce

<Breadcrumbs className=""icon={<Icon type="caret-right" />}>
  <Breadcrumbs.Breadcrumb>
    Projects
  </Breadcrumbs.Breadcrumb>
  {isCondition1 && (
    <Breadcrumbs.Breadcrumb>
      Offices
    </Breadcrumbs.Breadcrumb>
  )}
  {isCondition2 && (
    <Breadcrumbs.Breadcrumb>
      Members
    </Breadcrumbs.Breadcrumb>
  )}
</Breadcrumbs>

Expected behavior

isCondition1 isCondition displed
false false Projects
false true Projects > Members
true false Projects > Offices
false true Projects > Offices > Members

Actual behavior

isCondition1 isCondition displed
false false Projects >>
false true Projects > Members >
true false Projects > Offices >
false true Projects > Offices > Members