Skip to content

Commit

Permalink
Merge pull request #343 from newfold-labs/enhance/add-slug-primary-se…
Browse files Browse the repository at this point in the history
…condary-pills

Add `data-slug` to primary and secondary chips
  • Loading branch information
avneet-raj authored Oct 25, 2023
2 parents b73a552 + e6677c0 commit 531384a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ const StepPrimarySetup = () => {
return (
<div
key={ types[ type ]?.slug }
data-slug={ types[ type ]?.slug }
tabIndex={ idx + 1 }
role="button"
className={ `${
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ const StepSecondaryStep = () => {
return (
<div
key={ types[ type ]?.slug }
data-slug={ types[ type ]?.slug }
role="button"
tabIndex={ idx + 1 }
className={ `${
Expand Down Expand Up @@ -238,28 +239,28 @@ const StepSecondaryStep = () => {
<div className="category-scrolling-wrapper">
{ primaryTypesList &&
primaryTypesList.length > 1 && (
<div className="category-scrolling-wrapper__left-btn">
<span
className="category-scrolling-wrapper__left-btn-icon"
onClick={ () =>
changePrimaryType(
'back'
)
}
onKeyUp={ () =>
changePrimaryType(
'back'
)
}
role="button"
tabIndex={ 0 }
style={ {
backgroundImage:
<div className="category-scrolling-wrapper__left-btn">
<span
className="category-scrolling-wrapper__left-btn-icon"
onClick={ () =>
changePrimaryType(
'back'
)
}
onKeyUp={ () =>
changePrimaryType(
'back'
)
}
role="button"
tabIndex={ 0 }
style={ {
backgroundImage:
'var(--chevron-left-icon)',
} }
/>
</div>
) }
} }
/>
</div>
) }
<div className="category-scrolling-wrapper__type">
<span
className="category-scrolling-wrapper__type-icon"
Expand All @@ -273,28 +274,28 @@ const StepSecondaryStep = () => {
</div>
{ primaryTypesList &&
primaryTypesList.length > 1 && (
<div className="category-scrolling-wrapper__right-btn">
<span
className="category-scrolling-wrapper__right-btn-icon"
onClick={ () =>
changePrimaryType(
'next'
)
}
onKeyUp={ () =>
changePrimaryType(
'next'
)
}
role="button"
tabIndex={ 0 }
style={ {
backgroundImage:
<div className="category-scrolling-wrapper__right-btn">
<span
className="category-scrolling-wrapper__right-btn-icon"
onClick={ () =>
changePrimaryType(
'next'
)
}
onKeyUp={ () =>
changePrimaryType(
'next'
)
}
role="button"
tabIndex={ 0 }
style={ {
backgroundImage:
'var(--chevron-right-icon)',
} }
/>
</div>
) }
} }
/>
</div>
) }
</div>
) }
</div>
Expand Down

0 comments on commit 531384a

Please sign in to comment.