Skip to content

Commit 6be4d85

Browse files
committed
Default iconsClass to 'fa6'
Also update CDN links to latest version.
1 parent d8203ea commit 6be4d85

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
* Replaced `toggle` key with `collapseNode` and `expandNode` to better reflect state (#275)
1818
* Will now merge any missing keys with the default language
1919
* `icons`: Setting a node icon to `null` will no longer render the wrapper element (#30)
20+
* `iconsClass`: Now defaults to `'fa6'` for Font Awesome 5/6 instead of Font Awesome 4
2021

2122
#### Styling
2223

2324
* Drop support for Less.js styles
24-
* The `iconsClass` property now defaults to `"fa5"` for Font Awesome 5/6 instead of Font Awesome 4
2525
* The `rct-options` and `rct-option` CSS classes are now `rct-actions` and `rct-action` respectively
2626
* The `rct-title` CSS class is now `rct-label`
2727

examples/src/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<meta name="theme-color" content="#3498db">
88
<meta name="description" content="React Checkbox Tree: A simple, yet elegant checkbox treeview for React.">
9+
10+
<link rel="preconnect" href="https://fonts.googleapis.com">
11+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap">
913
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
10-
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css">
11-
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Roboto">
14+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
1215
<link rel="stylesheet" href="./scss/style.scss">
1316

1417
<!-- Google tag (gtag.js) -->

src/scss/react-checkbox-tree.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
$rct-icon-font-family: "Font Awesome 6 Free", "Font Awesome 5 Free",
2+
"FontAwesome", sans-serif;
13
$rct-icon-color: #33c !default;
2-
$rct-icon-font-family: "Font Awesome 5 Free", "FontAwesome", sans-serif;
34
$rct-label-hover: rgba($rct-icon-color, 0.1) !default;
45
$rct-label-active: rgba($rct-icon-color, 0.15) !default;
56
$rct-clickable-hover: rgba($rct-icon-color, 0.1) !default;
@@ -256,8 +257,9 @@ $rct-outline-offset: -2px !default;
256257
}
257258
}
258259

259-
// Font Awesome 5 style
260-
.rct-icons-fa5 {
260+
// Font Awesome 5 and 6 styles
261+
.rct-icons-fa5,
262+
.rct-icons-fa6 {
261263
.rct-icon-expand-close::before {
262264
font-weight: 900;
263265
content: "\f054";

0 commit comments

Comments
 (0)