@ainias42/react-bootstrap-mobile 1.0.11 → 1.0.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ainias42/react-bootstrap-mobile",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "Mobile React Components",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -31,8 +31,8 @@
31
31
  "@fortawesome/free-regular-svg-icons": "^6.7.2",
32
32
  "@fortawesome/free-solid-svg-icons": "^6.7.2",
33
33
  "@fortawesome/react-fontawesome": "^3.0.2",
34
- "react": "^19.2.3",
35
- "react-dom": "^19.2.3",
34
+ "react": "^19.1.4",
35
+ "react-dom": "^19.1.4",
36
36
  "react-hook-form": "^7.62.0"
37
37
  },
38
38
  "dependencies": {
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { FlavorWithText } from '../FlavorWithText';
3
2
  import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
3
  import { withMemo } from '../../helper/withMemo';
5
4
  import classNames from 'classnames';
6
5
  import styles from './icon.module.scss';
6
+ import type { FlavorWithText } from '../FlavorWithText';
7
7
  import type { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
8
8
  import type { IconDefinition } from '@fortawesome/free-regular-svg-icons';
9
9
  import type { IconProp } from '@fortawesome/fontawesome-svg-core';
@@ -34,7 +34,7 @@ export const BaseIcon = withMemo(function BaseIcon({
34
34
  noMargin = true,
35
35
  style,
36
36
  ref,
37
- flavor = FlavorWithText.PRIMARY,
37
+ flavor,
38
38
  ...props
39
39
  }: IconProps) {
40
40
  // Variables
@@ -59,7 +59,10 @@ export const BaseIcon = withMemo(function BaseIcon({
59
59
  <img
60
60
  src={icon}
61
61
  alt={alt}
62
- className={classNames(styles.imgIcon, flavor, className, { [styles.margin]: !noMargin })}
62
+ className={classNames(styles.imgIcon, className, {
63
+ [styles.margin]: !noMargin,
64
+ [flavor ?? '']: !!flavor,
65
+ })}
63
66
  style={style}
64
67
  ref={ref}
65
68
  />
@@ -69,7 +72,7 @@ export const BaseIcon = withMemo(function BaseIcon({
69
72
  <FontAwesomeIcon
70
73
  {...props}
71
74
  icon={icon as IconProp}
72
- className={classNames(styles.icon, flavor, className, { [styles.margin]: !noMargin })}
75
+ className={classNames(styles.icon, className, { [styles.margin]: !noMargin, [flavor ?? '']: !!flavor })}
73
76
  style={style}
74
77
  ref={ref as Ref<SVGSVGElement>}
75
78
  />