prasi-bun/app/web/src/render/live/elements/l-text.tsx

35 lines
809 B
TypeScript

import { FC } from "react";
import { IText } from "../../../utils/types/text";
import { PG } from "../logic/global";
import { LRender } from "./l-render";
export const LText: FC<{
id: string;
fromProp?: boolean;
_scopeIndex?: Record<string, any>;
}> = ({ id, fromProp, _scopeIndex }) => {
return <LRender id={id} fromProp={fromProp} _scopeIndex={_scopeIndex} />;
};
export const LTextInternal: FC<{
className: any;
p: PG;
item: IText;
_children: any;
}> = ({ className, item, _children }) => {
return (
<div
id={`text-${item.id}`}
className={cx(
className,
css`
outline: none;
min-width: 3px !important;
min-height: 10px !important;
`
)}
dangerouslySetInnerHTML={{ __html: _children || "" }}
/>
);
};