Skip to content

Commit d3c04eb

Browse files
mikachant-hamanojasmussenfcoveram
authored
Time to Read: Add word count icon (#72240)
* Add word count icon * Move time to read icon to icon lib * Update changelog Co-authored-by: mikachan <mikachan@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: fcoveram <fcoveram@git.wordpress.org>
1 parent 0a7e1cc commit d3c04eb

File tree

6 files changed

+15
-23
lines changed

6 files changed

+15
-23
lines changed

packages/block-library/src/post-time-to-read/icon.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/block-library/src/post-time-to-read/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
/**
2+
* WordPress dependencies
3+
*/
4+
import { timeToRead as icon } from '@wordpress/icons';
5+
16
/**
27
* Internal dependencies
38
*/
49
import initBlock from '../utils/init-block';
510
import metadata from './block.json';
611
import edit from './edit';
7-
import icon from './icon';
812
import variations from './variations';
913

1014
const { name } = metadata;

packages/block-library/src/post-time-to-read/variations.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
* WordPress dependencies
33
*/
44
import { __ } from '@wordpress/i18n';
5-
6-
/**
7-
* Internal dependencies
8-
*/
9-
import icon from './icon';
5+
import { timeToRead, wordCount } from '@wordpress/icons';
106

117
const variations = [
128
{
@@ -19,7 +15,7 @@ const variations = [
1915
scope: [ 'inserter', 'transform' ],
2016
isActive: ( blockAttributes ) =>
2117
blockAttributes?.displayMode === 'time',
22-
icon,
18+
icon: timeToRead,
2319
isDefault: true,
2420
},
2521
{
@@ -32,7 +28,7 @@ const variations = [
3228
scope: [ 'inserter', 'transform' ],
3329
isActive: ( blockAttributes ) =>
3430
blockAttributes?.displayMode === 'words',
35-
icon,
31+
icon: wordCount,
3632
},
3733
];
3834

packages/icons/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Enhancements
1010

1111
- Update `check` to be more optically balanced. ([#72101](https://github.com/WordPress/gutenberg/pull/72101))
12+
- Add new `timeToRead` and `wordCount` icons. ([#72240](https://github.com/WordPress/gutenberg/pull/72240))
1213

1314
## 10.32.0 (2025-10-01)
1415

Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)