fix tampilan html view
This commit is contained in:
@@ -4,7 +4,7 @@ import React from "react";
|
||||
|
||||
/**
|
||||
* ComponentGlobal_CardStyles
|
||||
*
|
||||
*
|
||||
* A React component that renders a customizable card element.
|
||||
*
|
||||
* Props:
|
||||
@@ -24,6 +24,7 @@ export function ComponentGlobal_CardStyles({
|
||||
height,
|
||||
color,
|
||||
onClickHandler,
|
||||
style,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
backgroundColor?: string;
|
||||
@@ -32,11 +33,13 @@ export function ComponentGlobal_CardStyles({
|
||||
height?: string | number;
|
||||
color?: string;
|
||||
onClickHandler?: React.MouseEventHandler<HTMLDivElement>;
|
||||
style?: React.CSSProperties;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
style={{
|
||||
...style,
|
||||
backgroundColor: backgroundColor
|
||||
? backgroundColor
|
||||
: AccentColor.darkblue,
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
.sticker-content .chat-content img {
|
||||
max-width: 70px;
|
||||
max-height: 70px;
|
||||
}
|
||||
@@ -1,18 +1,21 @@
|
||||
|
||||
export function Comp_V3_SetHtmlWithSticker({
|
||||
props,
|
||||
className,
|
||||
color,
|
||||
style,
|
||||
}: {
|
||||
props: string;
|
||||
className: string;
|
||||
className?: string;
|
||||
color?: string;
|
||||
style?: React.CSSProperties;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<div className={className} style={{
|
||||
color: color ? color : "white"
|
||||
}} dangerouslySetInnerHTML={{ __html: props }} />
|
||||
<div
|
||||
className={className}
|
||||
style={{ ...style, color: color ? color : "white" }}
|
||||
dangerouslySetInnerHTML={{ __html: props }}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,23 +1,30 @@
|
||||
import { MainColor } from "../../color";
|
||||
|
||||
export const Comp_DangerouslySetInnerHTML= ({
|
||||
export const Comp_DangerouslySetInnerHTML = ({
|
||||
props,
|
||||
color,
|
||||
style,
|
||||
}: {
|
||||
props: string | undefined;
|
||||
color?: string;
|
||||
}) => {
|
||||
style?: React.CSSProperties;
|
||||
}) => {
|
||||
const baseStyle: React.CSSProperties = {
|
||||
color: color ?? MainColor.white,
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
style={{
|
||||
color: color ? color : MainColor.white,
|
||||
...baseStyle,
|
||||
...style,
|
||||
// wordBreak: "break-word",
|
||||
}}
|
||||
// className="chat-content"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: props ?? "",
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user