@ainias42/react-bootstrap-mobile 1.0.12 → 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/dist/Components/Icon/BaseIcon.d.ts +1 -1
- package/dist/index.css +35 -35
- package/dist/index.css.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Components/Icon/BaseIcon.tsx +7 -4
package/package.json
CHANGED
|
@@ -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
|
|
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,
|
|
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,
|
|
75
|
+
className={classNames(styles.icon, className, { [styles.margin]: !noMargin, [flavor ?? '']: !!flavor })}
|
|
73
76
|
style={style}
|
|
74
77
|
ref={ref as Ref<SVGSVGElement>}
|
|
75
78
|
/>
|