import {
BaseBoxShapeUtil,
HTMLContainer,
TLBaseShape,
stopEventPropagation,
} from "tldraw";
type ITextCardShape = TLBaseShape<
"Textcard",
{ w: number; h: number; content: string; extrainfo: string; type: string }
>;
export class textCardUtil extends BaseBoxShapeUtil {
static override type = "Textcard" as const;
getDefaultProps(): ITextCardShape["props"] {
return {
w: 100,
h: 50,
content: "",
extrainfo: "",
type: "",
};
}
override canEdit = () => true;
component(s: ITextCardShape) {
const isEditing = this.editor.getEditingShapeId() === s.id;
return (
);
}
indicator(shape: ITextCardShape) {
return ;
}
}