Skip to content

Commit 41ac51c

Browse files
Merge branch 'next'
2 parents 2d9fffc + b057d70 commit 41ac51c

File tree

10 files changed

+17
-13
lines changed

10 files changed

+17
-13
lines changed
Loading
Loading

__tests__/parsers/gemoji.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('gemoji parser', () => {
4545
"hName": "i",
4646
"hProperties": {
4747
"className": [
48-
"fa",
48+
"fa-regular",
4949
"fa-lock",
5050
],
5151
},

components/Accordion/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ const Accordion = ({ children, icon, iconColor, title }) => {
88
return (
99
<details className="Accordion" onToggle={() => setIsOpen(!isOpen)}>
1010
<summary className="Accordion-title">
11-
<i className={`Accordion-toggleIcon${isOpen ? '_opened' : ''} fa fa-chevron-right`}></i>
12-
{icon && <i className={`Accordion-icon fa ${icon}`} style={{ color: `${iconColor}` }}></i>}
13-
{title}
11+
<i className={`Accordion-toggleIcon${isOpen ? '_opened' : ''} <i class="fa fa-regular fa-chevron-right"></i>`}></i>
12+
{icon && <i className={`Accordion-icon fa-duotone fa-solid ${icon}`} style={{ color: `${iconColor}` }}></i>}
13+
{title}
1414
</summary>
1515
<div className="Accordion-content">{children}</div>
1616
</details>

components/Callout/style.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
right: 100%;
9292
width: 2.4em;
9393
text-align: center;
94-
font: normal normal normal 1em/1 FontAwesome;
94+
font: normal normal normal 1em/1 var(--icon-font);
9595
}
9696
}
9797
.callout-icon {
@@ -102,7 +102,7 @@
102102
}
103103
@mixin calloutCustomIcons($R: callout) {
104104
--emoji: 1em;
105-
--icon-font: FontAwesome;
105+
--icon-font: var(--fa-style-family, 'Font Awesome 6 Pro');
106106
&-icon {
107107
font-size: var(--emoji, 0);
108108
color: var(--icon-color, inherit) !important;

components/Cards/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const Card = ({ children, href, icon, iconColor, target, title }) => {
66
const Tag = href ? 'a' : 'div';
77
return (
88
<Tag className="Card" href={href} target={target}>
9-
{icon && <i className={`Card-icon fa ${icon}`} style={{ color: `${iconColor}` }}></i>}
9+
{icon && <i className={`Card-icon fa-duotone fa-solid ${icon}`} style={{ color: `${iconColor}` }}></i>}
1010
{title && <p className='Card-title'>{title}</p>}
1111
<div className="Card-content">{children}</div>
1212
</Tag>

components/Heading/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Heading = ({ tag: Tag = 'h3', depth = 3, id, children, ...attrs }: Props)
1919
<a
2020
key={`heading-anchor-icon-${id}`}
2121
aria-label={`Skip link to ${children}`}
22-
className="heading-anchor-icon fa fa-anchor"
22+
className="heading-anchor-icon fa fa-regular fa-anchor"
2323
href={`#${id}`}
2424
/>
2525
</Tag>

components/Tabs/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ const Tabs = ({ children }) => {
1717
<div className="TabGroup">
1818
<header>
1919
<nav className="TabGroup-nav">
20-
{children?.map((tab, index: number) =>
20+
{children?.map((tab, index: number) =>
2121
<button className={`TabGroup-tab${activeTab === index ? '_active' : ''}`} key={tab.props.title} onClick={() => setActiveTab(index)}>
22-
{tab.props.icon && <i className={`TabGroup-icon fa ${tab.props.icon}`} style={{ color: `${tab.props.iconColor}` }}></i>}
22+
{tab.props.icon && <i className={`TabGroup-icon fa-duotone fa-solid ${tab.props.icon}`} style={{ color: `${tab.props.iconColor}` }}></i>}
2323
{tab.props.title}
2424
</button>
2525
)}

docs/callouts.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Callouts come in [various themes](#section--examples-). These can be customized
8484
--border: #8b939c;
8585
}
8686
```
87+
8788
```scss Theme Selectors
8889
.markdown-body .callout.callout_default {
8990
} /* gray */
@@ -108,11 +109,13 @@ Each callout will also have a `theme` attribute that's set to it's emoji prefix.
108109
--text: #f5fffa;
109110
}
110111
```
112+
111113
```markdown Markdown Syntax
112114
> 🎅 Old Saint Nick
113115
>
114116
> 'Twas the night before Christmas, when all through the house not a creature was stirring, not even a mouse. The stockings were hung by the chimney with care, in hopes that St. Nicholas soon would be there. The children were nestled all snug in their beds, while visions of sugar plums danced in their heads.
115117
```
118+
116119
```html Generated HTML
117120
<!-- condensed for clarity! -->
118121
<blockquote class="callout callout_default" theme="🎅">
@@ -140,10 +143,11 @@ With a touch of Custom CSS, we should be able to get a callout using the 📷 em
140143
```css Custom CSS
141144
.callout[theme='📷'] {
142145
--emoji: unset;
143-
--icon: '\f083'; /* copied from FontAwesome */
146+
--icon: '\f030'; /* https://fontawesome.com/icons/camera?f=classic&s=solid */
144147
--icon-color: #c50a50;
145148
}
146149
```
150+
147151
```Markdown Syntax
148152
> 📷 Cool pix!
149153
>
@@ -187,7 +191,7 @@ The custom icon font defaults to `FontAwesome`, but you can use any font family
187191

188192
```css
189193
.callout[theme='📷'] {
190-
--icon-font-family: FontAwesome; /* copied from https://fontawesome.com/v4.7.0/icon/camera-retro */
194+
--icon-font: 'Font Awesome 6 Pro';
191195
}
192196
```
193197

processor/transform/gemoji+.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const gemojiReplacer = (_, name: string) => {
2424
data: {
2525
hName: 'i',
2626
hProperties: {
27-
className: ['fa', name],
27+
className: ['fa-regular', name],
2828
},
2929
},
3030
};

0 commit comments

Comments
 (0)