Skip to content

Commit fcbf9b8

Browse files
committed
refactor: update CIcons
1 parent 9b847ae commit fcbf9b8

File tree

18 files changed

+136
-141
lines changed

18 files changed

+136
-141
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@coreui/chartjs": "3.0.0",
3030
"@coreui/coreui": "4.0.1",
3131
"@coreui/icons": "^2.0.1",
32-
"@coreui/icons-react": "^2.0.0-rc.0",
32+
"@coreui/icons-react": "^2.0.0-rc.5",
3333
"@coreui/react": "4.0.0-beta.4",
3434
"@coreui/react-chartjs": "2.0.0-rc.0",
3535
"@coreui/utils": "^1.3.1",

src/_nav.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const _nav = [
66
component: 'CNavItem',
77
name: 'Dashboard',
88
to: '/dashboard',
9-
icon: <CIcon name="cil-speedometer" customClassName="nav-icon" />,
9+
icon: <CIcon icon="cil-speedometer" customClassName="nav-icon" />,
1010
badge: {
1111
color: 'info',
1212
text: 'NEW',
@@ -20,13 +20,13 @@ const _nav = [
2020
component: 'CNavItem',
2121
name: 'Colors',
2222
to: '/theme/colors',
23-
icon: <CIcon name="cil-drop" customClassName="nav-icon" />,
23+
icon: <CIcon icon="cil-drop" customClassName="nav-icon" />,
2424
},
2525
{
2626
component: 'CNavItem',
2727
name: 'Typography',
2828
to: '/theme/typography',
29-
icon: <CIcon name="cil-pencil" customClassName="nav-icon" />,
29+
icon: <CIcon icon="cil-pencil" customClassName="nav-icon" />,
3030
},
3131
{
3232
component: 'CNavTitle',
@@ -122,7 +122,7 @@ const _nav = [
122122
component: 'CNavGroup',
123123
name: 'Buttons',
124124
to: '/buttons',
125-
icon: <CIcon name="cil-cursor" customClassName="nav-icon" />,
125+
icon: <CIcon icon="cil-cursor" customClassName="nav-icon" />,
126126
items: [
127127
{
128128
component: 'CNavItem',
@@ -147,7 +147,7 @@ const _nav = [
147147
{
148148
component: 'CNavGroup',
149149
name: 'Forms',
150-
icon: <CIcon name="cil-notes" customClassName="nav-icon" />,
150+
icon: <CIcon icon="cil-notes" customClassName="nav-icon" />,
151151
items: [
152152
{
153153
component: 'CNavItem',
@@ -203,12 +203,12 @@ const _nav = [
203203
component: 'CNavItem',
204204
name: 'Charts',
205205
to: '/charts',
206-
icon: <CIcon name="cil-chart-pie" customClassName="nav-icon" />,
206+
icon: <CIcon icon="cil-chart-pie" customClassName="nav-icon" />,
207207
},
208208
{
209209
component: 'CNavGroup',
210210
name: 'Icons',
211-
icon: <CIcon name="cil-star" customClassName="nav-icon" />,
211+
icon: <CIcon icon="cil-star" customClassName="nav-icon" />,
212212
items: [
213213
{
214214
component: 'CNavItem',
@@ -237,7 +237,7 @@ const _nav = [
237237
{
238238
component: 'CNavGroup',
239239
name: 'Notifications',
240-
icon: <CIcon name="cil-bell" customClassName="nav-icon" />,
240+
icon: <CIcon icon="cil-bell" customClassName="nav-icon" />,
241241
items: [
242242
{
243243
component: 'CNavItem',
@@ -269,7 +269,7 @@ const _nav = [
269269
component: 'CNavItem',
270270
name: 'Widgets',
271271
to: '/widgets',
272-
icon: <CIcon name="cil-calculator" customClassName="nav-icon" />,
272+
icon: <CIcon icon="cil-calculator" customClassName="nav-icon" />,
273273
badge: {
274274
color: 'info',
275275
text: 'NEW',
@@ -282,7 +282,7 @@ const _nav = [
282282
{
283283
component: 'CNavGroup',
284284
name: 'Pages',
285-
icon: <CIcon name="cil-star" customClassName="nav-icon" />,
285+
icon: <CIcon icon="cil-star" customClassName="nav-icon" />,
286286
items: [
287287
{
288288
component: 'CNavItem',

src/components/AppHeader.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ const AppHeader = () => {
2828
className="ps-1"
2929
onClick={() => dispatch({ type: 'set', sidebarShow: !sidebarShow })}
3030
>
31-
<CIcon name="cil-menu" size="lg" />
31+
<CIcon icon="cil-menu" size="lg" />
3232
</CHeaderToggler>
3333
<CHeaderBrand className="mx-auto d-md-none" to="/">
34-
<CIcon name="logo" height="48" alt="Logo" />
34+
<CIcon icon="logo" height={48} alt="Logo" />
3535
</CHeaderBrand>
3636
<CHeaderNav className="d-none d-md-flex me-auto">
3737
<CNavItem>
@@ -49,17 +49,17 @@ const AppHeader = () => {
4949
<CHeaderNav>
5050
<CNavItem>
5151
<CNavLink href="#">
52-
<CIcon name="cil-bell" size="lg" />
52+
<CIcon icon="cil-bell" size="lg" />
5353
</CNavLink>
5454
</CNavItem>
5555
<CNavItem>
5656
<CNavLink href="#">
57-
<CIcon name="cil-list" size="lg" />
57+
<CIcon icon="cil-list" size="lg" />
5858
</CNavLink>
5959
</CNavItem>
6060
<CNavItem>
6161
<CNavLink href="#">
62-
<CIcon name="cil-envelope-open" size="lg" />
62+
<CIcon icon="cil-envelope-open" size="lg" />
6363
</CNavLink>
6464
</CNavItem>
6565
</CHeaderNav>

src/components/AppSidebar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const AppSidebar = () => {
2929
}}
3030
>
3131
<CSidebarBrand className="d-none d-md-flex" to="/">
32-
<CIcon className="sidebar-brand-full" name="logo-negative" height={35} />
33-
<CIcon className="sidebar-brand-narrow" name="sygnet" height={35} />
32+
<CIcon className="sidebar-brand-full" icon="logo-negative" height={35} />
33+
<CIcon className="sidebar-brand-narrow" icon="sygnet" height={35} />
3434
</CSidebarBrand>
3535
<CSidebarNav>
3636
<SimpleBar>

src/components/AppSidebarNav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const AppSidebarNav = ({ items }) => {
1212
const navLink = (name, icon, badge) => {
1313
return (
1414
<>
15-
{icon && typeof icon === 'string' ? <CIcon name={icon} customClassName="nav-icon" /> : icon}
15+
{icon && typeof icon === 'string' ? <CIcon icon={icon} customClassName="nav-icon" /> : icon}
1616
{name && name}
1717
{badge && (
1818
<CBadge color={badge.color} className="ms-auto">

src/components/DocsExample.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ const DocsExample = (props) => {
1515
<CNav variant="tabs">
1616
<CNavItem>
1717
<CNavLink href="#" active>
18-
<CIcon name="cil-media-play" className="me-2" />
18+
<CIcon icon="cil-media-play" className="me-2" />
1919
Preview
2020
</CNavLink>
2121
</CNavItem>
2222
<CNavItem>
2323
<CNavLink href={_href} target="_blank">
24-
<CIcon name="cil-code" className="me-2" />
24+
<CIcon icon="cil-code" className="me-2" />
2525
Code
2626
</CNavLink>
2727
</CNavItem>

src/components/header/AppHeaderDropdown.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,59 +20,59 @@ const AppHeaderDropdown = () => {
2020
<CDropdownMenu className="pt-0" placement="bottom-end">
2121
<CDropdownHeader className="bg-light fw-semibold py-2">Account</CDropdownHeader>
2222
<CDropdownItem href="#">
23-
<CIcon name="cil-bell" className="me-2" />
23+
<CIcon icon="cil-bell" className="me-2" />
2424
Updates
2525
<CBadge color="info" className="ms-2">
2626
42
2727
</CBadge>
2828
</CDropdownItem>
2929
<CDropdownItem href="#">
30-
<CIcon name="cil-envelope-open" className="me-2" />
30+
<CIcon icon="cil-envelope-open" className="me-2" />
3131
Messages
3232
<CBadge color="success" className="ms-2">
3333
42
3434
</CBadge>
3535
</CDropdownItem>
3636
<CDropdownItem href="#">
37-
<CIcon name="cil-task" className="me-2" />
37+
<CIcon icon="cil-task" className="me-2" />
3838
Tasks
3939
<CBadge color="danger" className="ms-2">
4040
42
4141
</CBadge>
4242
</CDropdownItem>
4343
<CDropdownItem href="#">
44-
<CIcon name="cil-comment-square" className="me-2" />
44+
<CIcon icon="cil-comment-square" className="me-2" />
4545
Comments
4646
<CBadge color="warning" className="ms-2">
4747
42
4848
</CBadge>
4949
</CDropdownItem>
5050
<CDropdownHeader className="bg-light fw-semibold py-2">Settings</CDropdownHeader>
5151
<CDropdownItem href="#">
52-
<CIcon name="cil-user" className="me-2" />
52+
<CIcon icon="cil-user" className="me-2" />
5353
Profile
5454
</CDropdownItem>
5555
<CDropdownItem href="#">
56-
<CIcon name="cil-settings" className="me-2" />
56+
<CIcon icon="cil-settings" className="me-2" />
5757
Settings
5858
</CDropdownItem>
5959
<CDropdownItem href="#">
60-
<CIcon name="cil-credit-card" className="me-2" />
60+
<CIcon icon="cil-credit-card" className="me-2" />
6161
Payments
6262
<CBadge color="secondary" className="ms-2">
6363
42
6464
</CBadge>
6565
</CDropdownItem>
6666
<CDropdownItem href="#">
67-
<CIcon name="cil-file" className="me-2" />
67+
<CIcon icon="cil-file" className="me-2" />
6868
Projects
6969
<CBadge color="primary" className="ms-2">
7070
42
7171
</CBadge>
7272
</CDropdownItem>
7373
<CDropdownDivider />
7474
<CDropdownItem href="#">
75-
<CIcon name="cil-lock-locked" className="me-2" />
75+
<CIcon icon="cil-lock-locked" className="me-2" />
7676
Lock Account
7777
</CDropdownItem>
7878
</CDropdownMenu>

src/views/components/buttons/buttons/Buttons.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ const Buttons = () => {
8787
active={state === 'active'}
8888
disabled={state === 'disabled'}
8989
>
90-
<CIcon name="cil-bell" className="me-2" />
90+
<CIcon icon="cil-bell" className="me-2" />
9191
{color.charAt(0).toUpperCase() + color.slice(1)}
9292
</CButton>
9393
))}
9494
<CButton color="link">
95-
<CIcon name="cil-bell" className="me-2" />
95+
<CIcon icon="cil-bell" className="me-2" />
9696
Link
9797
</CButton>
9898
</CCol>

src/views/components/icons/brands/Brands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const toKebabCase = (str) => {
1111
export const getIconsView = (iconset) => {
1212
return Object.entries(iconset).map(([name, value]) => (
1313
<CCol className="mb-5" xs={6} sm={4} md={3} xl={2} key={name}>
14-
<CIcon content={value} size="xxl" />
14+
<CIcon icon={value} size="xxl" />
1515
<div>{toKebabCase(name)}</div>
1616
</CCol>
1717
))

0 commit comments

Comments
 (0)