tech-stack-icons 3.0.3 → 3.1.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.
- package/dist/index.d.ts +17 -0
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC, CSSProperties } from "react";
|
|
2
|
+
type Variant = "light" | "dark" | "grayscale";
|
|
3
|
+
type IconDefinition = {
|
|
4
|
+
keywords?: string[];
|
|
5
|
+
svg: Record<Variant, string>;
|
|
6
|
+
};
|
|
7
|
+
type IconsMap = Record<string, IconDefinition>;
|
|
8
|
+
declare const typedIconsData: IconsMap;
|
|
9
|
+
export type IconName = keyof typeof typedIconsData;
|
|
10
|
+
interface StackIconProps {
|
|
11
|
+
name: IconName;
|
|
12
|
+
variant?: Variant;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
declare const StackIcon: FC<StackIconProps>;
|
|
17
|
+
export default StackIcon;
|
package/dist/index.js
CHANGED
|
@@ -18104,4 +18104,4 @@
|
|
|
18104
18104
|
width: 100%;
|
|
18105
18105
|
height: 100%;
|
|
18106
18106
|
}
|
|
18107
|
-
`,a
|
|
18107
|
+
`,a="tech-stack-icons-style",B=({name:C,variant:l="light",className:e,style:d})=>{var t;let n=w[C];if(!n)return console.error(`Icon with name "${C}" not found.`),null;let o=(t=n.svg)==null?void 0:t[l];if(!o)return console.error(`SVG variant "${l}" not found for icon "${C}".`),null;if(typeof window<"u"&&!document.getElementById(a)){let L=document.createElement("style");L.id=a,L.innerHTML=_,document.head.appendChild(L)}let s=["7bd9d5c2-f372-4334-8686-d18151710c53-tech-stack-icons",e].filter(Boolean).join(" ");return f.default.createElement("span",{className:s,style:d,dangerouslySetInnerHTML:{__html:o}})},A=B;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tech-stack-icons",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
-
"build": "esbuild src/index.tsx --bundle --minify --platform=node --target=node12 --outdir=dist --external:react --external:react-dom",
|
|
10
|
-
"build:types": "tsc --emitDeclarationOnly --declaration"
|
|
9
|
+
"build": "npm run build:types && esbuild src/index.tsx --bundle --minify --platform=node --target=node12 --outdir=dist --external:react --external:react-dom",
|
|
10
|
+
"build:types": "tsc --emitDeclarationOnly --declaration --outDir dist"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
13
13
|
"tech stack icons",
|