@allxsmith/bestax-bulma 5.2.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1155,6 +1155,18 @@ Pagination.Ellipsis = PaginationEllipsis;
1155
1155
  Pagination.Previous = PaginationPrevious;
1156
1156
  Pagination.Next = PaginationNext;
1157
1157
 
1158
+ function stripRedundantLibraryPrefix(name, library) {
1159
+ if (!name) {
1160
+ return name;
1161
+ }
1162
+ if (library === 'fa' && name.startsWith('fa-')) {
1163
+ return name.substring(3);
1164
+ }
1165
+ if (library === 'mdi' && name.startsWith('mdi-')) {
1166
+ return name.substring(4);
1167
+ }
1168
+ return name;
1169
+ }
1158
1170
  function getIconClasses(library, name, variant, features) {
1159
1171
  let baseClass;
1160
1172
  let iconClass;
@@ -1228,6 +1240,7 @@ const Icon = ({ className, textColor, bgColor, name, library, variant, features,
1228
1240
  }
1229
1241
  const defaultLibrary = useIconLibrary();
1230
1242
  const finalLibrary = library || defaultLibrary || 'fa';
1243
+ finalName = stripRedundantLibraryPrefix(finalName, finalLibrary);
1231
1244
  const { bulmaHelperClasses, rest } = useBulmaClasses({
1232
1245
  color: textColor,
1233
1246
  backgroundColor: bgColor,