@ichaingo/avatar 1.1.0

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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # @ichaingo/avatar
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test @ichaingo/avatar` to execute the unit tests via [Vitest](https://vitest.dev/).
@@ -0,0 +1,6 @@
1
+ export default function Avatar({ userInfo, url, className }: {
2
+ userInfo?: Record<string, any>;
3
+ url?: string;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAIhI"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { twMerge as e } from "tailwind-merge";
3
+ import i from "@ichaingo/image";
4
+ function d({ userInfo: r, url: l, className: t }) {
5
+ return /* @__PURE__ */ a("div", { className: e(t), children: /* @__PURE__ */ a(i, { src: l || (r != null && r.id ? `${process.env.NEXT_PUBLIC_IMAGES_URL}/user-profile/${r == null ? void 0 : r.id}.png?t=${Date.now()}` : ""), className: "w-full h-full rounded-full", errorSrc: `${process.env.NEXT_PUBLIC_IMAGES_URL}/user-profile/avatar.png` }) });
6
+ }
7
+ export {
8
+ d as default
9
+ };
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@ichaingo/avatar",
3
+ "version": "1.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ "./package.json": "./package.json",
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "default": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "!**/*.tsbuildinfo"
19
+ ],
20
+ "dependencies": {
21
+ "tailwind-merge": "^2.5.5",
22
+ "@ichaingo/image": "1.1.0"
23
+ }
24
+ }