44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import React from "react";
|
|
import { AutoRegisteringComponentRenderer } from "../../AutoRegisteringComponentRenderer";
|
|
import { TextDisplayDefinition } from "./index";
|
|
import { TextDisplayComponent } from "./TextDisplayComponent";
|
|
|
|
/**
|
|
* TextDisplay 렌더러
|
|
* 자동 등록 시스템을 사용하여 컴포넌트를 레지스트리에 등록
|
|
*/
|
|
export class TextDisplayRenderer extends AutoRegisteringComponentRenderer {
|
|
static componentDefinition = TextDisplayDefinition;
|
|
|
|
render(): React.ReactElement {
|
|
return <TextDisplayComponent {...this.props} renderer={this} />;
|
|
}
|
|
|
|
/**
|
|
* 컴포넌트별 특화 메서드들
|
|
*/
|
|
|
|
// text 타입 특화 속성 처리
|
|
protected getTextDisplayProps() {
|
|
const baseProps = this.getWebTypeProps();
|
|
|
|
// text 타입에 특화된 추가 속성들
|
|
return {
|
|
...baseProps,
|
|
// 여기에 text 타입 특화 속성들 추가
|
|
};
|
|
}
|
|
|
|
// 클릭 처리
|
|
protected handleClick = () => {
|
|
// 클릭 로직
|
|
};
|
|
}
|
|
|
|
// 자동 등록 실행
|
|
TextDisplayRenderer.registerSelf();
|
|
|
|
// Hot Reload는 Next.js에서 자동으로 처리됨
|