Closed
Description
I am trying to adjust the size of icon in the CSidebarNavItem by passing icon as an object, such as
<CSidebarNavItem
name="Dashboard"
to="/dashboard"
:icon="{name: 'cil-chart', size: '4xl'}"
/>
however the size prop is not passed to CIcon.
However, creating a CIcon with the size
prop works just fine
<CIcon name="cil-chart" size="4xl"/>
After searching through the code I saw that CIconRaw is imported instead of CIcon
Could it be that importing CIconRaw instead of CIcon is to blame here?
Metadata
Metadata
Assignees
Labels
No labels
Activity
woothu commentedon Apr 2, 2020
Hi, thank you for the report!
in fact, it doesn't work because 'customClasses' is set to 'c-sidebar-nav-icon' inside CSidebarNavItem overriding size prop in CIcon.
Hotfix:
We will think of a better solution, and fixing documentation of CIcon (it doesn't say that using customClasses overrides size prop).
CVeniamin commentedon Apr 2, 2020
@woothu, thank you for the hotfix!
fix: CSidebarNavItem: allow adding 'size' prop in 'icon' object #76
fix: CSidebarNavDropdown: allow adding 'size' prop in 'icon' object #76