Browse Source

Remove reference to icon font from Draftail/index.js

Matt Westcott 1 year ago
parent
commit
c631a64e44
1 changed files with 3 additions and 4 deletions
  1. 3 4
      client/src/components/Draftail/index.js

+ 3 - 4
client/src/components/Draftail/index.js

@@ -108,12 +108,11 @@ const registerPlugin = (type, optionName = 'entityTypes') => {
 };
 
 /**
- * Wraps a style/block/entity type’s icon with an icon font implementation,
- * so Draftail can use icon fonts in its toolbar.
+ * Wraps a style/block/entity type’s icon identifier with an icon component.
  */
 export const wrapWagtailIcon = (type) => {
-  const isIconFont = type.icon && typeof type.icon === 'string';
-  if (isIconFont) {
+  const isNamedIcon = type.icon && typeof type.icon === 'string';
+  if (isNamedIcon) {
     return Object.assign(type, {
       icon: <Icon name={type.icon} />,
     });