@blockle/blocks-react 2.5.3 → 2.5.4
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.
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Atoms, ComponentThemes } from '@blockle/blocks-core';
|
|
1
|
+
import { Atoms, ComponentThemes, MarginAtoms } from '@blockle/blocks-core';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
type IconTheme = ComponentThemes['icon'];
|
|
4
4
|
export type IconMaskProps = {
|
|
5
5
|
className?: string;
|
|
6
6
|
color?: Atoms['color'];
|
|
7
|
-
|
|
7
|
+
display?: Atoms['display'];
|
|
8
8
|
size?: IconTheme['variants']['size'];
|
|
9
|
-
|
|
9
|
+
src: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
} & MarginAtoms;
|
|
10
12
|
export declare const IconMask: React.FC<IconMaskProps>;
|
|
11
13
|
export {};
|
|
12
14
|
//# sourceMappingURL=IconMask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconMask.d.ts","sourceRoot":"","sources":["../../../../src/components/display/Icon/IconMask.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"IconMask.d.ts","sourceRoot":"","sources":["../../../../src/components/display/Icon/IconMask.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,eAAe,EAGpB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,KAAK,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;AAEzC,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,GAAG,WAAW,CAAC;AAEhB,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA6B5C,CAAC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { classnames, atoms } from "@blockle/blocks-core";
|
|
2
|
+
import { getAtomsAndProps, classnames, atoms } from "@blockle/blocks-core";
|
|
3
3
|
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
4
4
|
import { iconMask } from "./IconMask.css.js";
|
|
5
5
|
const IconMask = ({
|
|
6
6
|
className,
|
|
7
7
|
color = "currentColor",
|
|
8
8
|
src,
|
|
9
|
-
size
|
|
9
|
+
size,
|
|
10
|
+
style,
|
|
11
|
+
...restProps
|
|
10
12
|
}) => {
|
|
13
|
+
const [atomsProps, otherProps] = getAtomsAndProps(restProps);
|
|
11
14
|
const iconClassName = useComponentStyles("icon", {
|
|
12
15
|
variants: { size }
|
|
13
16
|
});
|
|
@@ -16,14 +19,16 @@ const IconMask = ({
|
|
|
16
19
|
{
|
|
17
20
|
role: "presentation",
|
|
18
21
|
className: classnames(
|
|
19
|
-
atoms({ color }),
|
|
22
|
+
atoms({ color, ...atomsProps }),
|
|
20
23
|
iconMask,
|
|
21
24
|
iconClassName,
|
|
22
25
|
className
|
|
23
26
|
),
|
|
24
27
|
style: {
|
|
25
|
-
mask: `url(${src}) no-repeat center
|
|
26
|
-
|
|
28
|
+
mask: `url(${src}) no-repeat center`,
|
|
29
|
+
...style
|
|
30
|
+
},
|
|
31
|
+
...otherProps
|
|
27
32
|
}
|
|
28
33
|
);
|
|
29
34
|
};
|
|
@@ -2,7 +2,7 @@ import { HeroIconName } from './heroicons.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* EXPORTED ONLY FOR DEMO PURPOSES
|
|
4
4
|
*/
|
|
5
|
-
export declare const HeroIcon: ({ name, ...props }: Omit<
|
|
5
|
+
export declare const HeroIcon: ({ name, ...props }: Omit<any, "src"> & {
|
|
6
6
|
name: HeroIconName;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=exampleIconMask.d.ts.map
|