@ainias42/react-bootstrap-mobile 0.1.17 → 0.1.18

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.
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { IconProps, IconSource } from "./Icon";
3
+ export type DoubleIconProps = IconProps & {
4
+ secondIcon: IconSource;
5
+ secondIconColor?: string;
6
+ };
7
+ export declare const DoubleIcon: ({ secondIcon, secondIconColor, color, ...otherProps }: DoubleIconProps) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ainias42/react-bootstrap-mobile",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Mobile React Components using Bootstrap",
5
5
  "main": "dist/bootstrapReactMobile",
6
6
  "scripts": {
@@ -61,6 +61,7 @@
61
61
  }
62
62
 
63
63
  .tag {
64
+ --text-primary-default-color: white;
64
65
  color: white;
65
66
  background-color: var(--flavor-accent);
66
67
  padding: 0.1rem 0.2rem;
@@ -83,6 +84,7 @@
83
84
  cursor: pointer;
84
85
 
85
86
  &.active {
87
+ --text-primary-default-color: white;
86
88
  color: white;
87
89
  background-color: var(--flavor-accent);
88
90
  }
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import {withMemo} from "../../helper/withMemo";
3
+ import {InlineBlock} from "../Layout/InlineBlock";
4
+ import {Icon, IconProps, IconSource} from "./Icon";
5
+
6
+ import styles from "./icon.scss";
7
+
8
+ export type DoubleIconProps = IconProps & {
9
+ secondIcon: IconSource;
10
+ secondIconColor?: string;
11
+ }
12
+
13
+ export const DoubleIcon = withMemo(function DoubleIcon({secondIcon, secondIconColor, color, ...otherProps}: DoubleIconProps) {
14
+ // Refs
15
+
16
+ // States/Variables/Selectors
17
+
18
+ // Dispatch
19
+
20
+ // Callbacks
21
+
22
+ // Effects
23
+
24
+ // Other
25
+
26
+ // RenderFunctions
27
+
28
+ return <InlineBlock className={styles.doubleIconContainer}>
29
+ <Icon {...otherProps} color={color}/>
30
+ <Icon icon={secondIcon} size="xs"
31
+ className={styles.secondIcon}
32
+ color={secondIconColor ?? color}/>
33
+ </InlineBlock>;
34
+ }, styles);
@@ -7,3 +7,14 @@
7
7
  height: calc(1em + 4px);
8
8
  object-fit: contain;
9
9
  }
10
+
11
+ .doubleIconContainer {
12
+ position: relative;
13
+ padding: 3px;
14
+ .secondIcon {
15
+ position: absolute;
16
+ right: 3px;
17
+ bottom: 3px;
18
+ pointer-events: none;
19
+ }
20
+ }
@@ -18,6 +18,7 @@
18
18
  background-color: rgba(0, 0, 0, 0.8);
19
19
  min-height: 48px;
20
20
  line-height: 1.5;
21
+ --text-primary-default-color: white;
21
22
  color: white;
22
23
  font-size: 0.77rem;
23
24
  letter-spacing: normal;