react-better-html 1.1.90 → 1.1.91
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 +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A component library for react that is as close to plane html as possible
|
|
|
6
6
|

|
|
7
7
|

|
|
8
8
|
<br/>
|
|
9
|
-

|
|
9
|
+

|
|
10
10
|

|
|
11
11
|
<br/>
|
|
12
12
|
<br/>
|
package/dist/index.d.mts
CHANGED
|
@@ -167,6 +167,8 @@ type ImageComponent = {
|
|
|
167
167
|
profileImage: (props: ComponentPropWithRef<HTMLImageElement, OmitProps<ImageProps, "width" | "height"> & {
|
|
168
168
|
/** @default 40 */
|
|
169
169
|
size?: number;
|
|
170
|
+
letters?: string;
|
|
171
|
+
backgroundColor?: string;
|
|
170
172
|
}>) => React.ReactElement;
|
|
171
173
|
};
|
|
172
174
|
declare const Image: ImageComponent;
|
package/dist/index.d.ts
CHANGED
|
@@ -167,6 +167,8 @@ type ImageComponent = {
|
|
|
167
167
|
profileImage: (props: ComponentPropWithRef<HTMLImageElement, OmitProps<ImageProps, "width" | "height"> & {
|
|
168
168
|
/** @default 40 */
|
|
169
169
|
size?: number;
|
|
170
|
+
letters?: string;
|
|
171
|
+
backgroundColor?: string;
|
|
170
172
|
}>) => React.ReactElement;
|
|
171
173
|
};
|
|
172
174
|
declare const Image: ImageComponent;
|
package/dist/index.js
CHANGED
|
@@ -2543,8 +2543,22 @@ var Image = (0, import_react8.forwardRef)(function Image2({ name, src, ...props
|
|
|
2543
2543
|
}
|
|
2544
2544
|
);
|
|
2545
2545
|
});
|
|
2546
|
-
Image.profileImage = (0, import_react8.forwardRef)(function ProfileImage({ size = 40, ...props }, ref) {
|
|
2547
|
-
|
|
2546
|
+
Image.profileImage = (0, import_react8.forwardRef)(function ProfileImage({ size = 40, letters, backgroundColor, ...props }, ref) {
|
|
2547
|
+
const theme2 = useTheme();
|
|
2548
|
+
return letters ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2549
|
+
Div_default.row,
|
|
2550
|
+
{
|
|
2551
|
+
width: size,
|
|
2552
|
+
height: size,
|
|
2553
|
+
backgroundColor: backgroundColor ?? theme2.colors.backgroundSecondary,
|
|
2554
|
+
borderRadius: 999,
|
|
2555
|
+
alignItems: "center",
|
|
2556
|
+
justifyContent: "center",
|
|
2557
|
+
ref,
|
|
2558
|
+
...props,
|
|
2559
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text_default, { fontWeight: 700, children: letters.toUpperCase().slice(0, 2) })
|
|
2560
|
+
}
|
|
2561
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Image, { width: size, height: size, borderRadius: 999, objectFit: "cover", ref, ...props });
|
|
2548
2562
|
});
|
|
2549
2563
|
var MemoizedImage = (0, import_react8.memo)(Image);
|
|
2550
2564
|
MemoizedImage.profileImage = Image.profileImage;
|