ERP-node/frontend/lib/registry/components/v2-card-display/CardDisplayRenderer.tsx

52 lines
1.2 KiB
TypeScript
Raw Normal View History

"use client";
import React from "react";
import { AutoRegisteringComponentRenderer } from "../../AutoRegisteringComponentRenderer";
import { V2CardDisplayDefinition } from "./index";
import { CardDisplayComponent } from "./CardDisplayComponent";
/**
* CardDisplay
*
*/
export class CardDisplayRenderer extends AutoRegisteringComponentRenderer {
static componentDefinition = V2CardDisplayDefinition;
render(): React.ReactElement {
return <CardDisplayComponent {...this.props} renderer={this} />;
}
/**
*
*/
// text 타입 특화 속성 처리
protected getCardDisplayProps() {
const baseProps = this.getWebTypeProps();
// text 타입에 특화된 추가 속성들
return {
...baseProps,
// 여기에 text 타입 특화 속성들 추가
};
}
// 값 변경 처리
protected handleValueChange = (value: any) => {
this.updateComponent({ value });
};
// 포커스 처리
protected handleFocus = () => {
// 포커스 로직
};
// 블러 처리
protected handleBlur = () => {
// 블러 로직
};
}
// 자동 등록 실행
CardDisplayRenderer.registerSelf();