8000 feat: CSidebarNavItem: add color prop · AdnanBoota/coreui-react@12c2ba3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 12c2ba3

Browse files
committed
feat: CSidebarNavItem: add color prop
1 parent 907e59a commit 12c2ba3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/template/CSidebarNavItem.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const CSidebarNavItem = props => {
1919
badge,
2020
addLinkClass,
2121
label,
22+
color,
2223
...rest
2324
} = props
2425

@@ -30,6 +31,7 @@ const CSidebarNavItem = props => {
3031

3132
const linkClasses = classNames(
3233
label ? 'c-sidebar-nav-label' : 'c-sidebar-nav-link',
34+
color && `c-sidebar-nav-link-${color}`,
3335
addLinkClass
3436
)
3537

@@ -55,14 +57,14 @@ const CSidebarNavItem = props => {
5557
CSidebarNavItem.propTypes = {
5658
children: PropTypes.node,
5759
className: PropTypes.string,
58-
//
5960
innerRef: PropTypes.oneOfType([PropTypes 876F .func, PropTypes.string, PropTypes.object]),
6061
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
6162
fontIcon: PropTypes.string,
6263
badge: PropTypes.object,
6364
addLinkClass: PropTypes.string,
6465
label: PropTypes.bool,
65-
name: PropTypes.string
66-
};
66+
name: PropTypes.string,
67+
color: PropTypes.string
68+
}
6769

6870
export default CSidebarNavItem

0 commit comments

Comments
 (0)
0