컴포넌트 추가방식 변경
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { AutoRegisteringComponentRenderer } from "../../AutoRegisteringComponentRenderer";
|
||||
import { TextareaBasicDefinition } from "./index";
|
||||
import { TextareaBasicComponent } from "./TextareaBasicComponent";
|
||||
|
||||
/**
|
||||
* TextareaBasic 렌더러
|
||||
* 자동 등록 시스템을 사용하여 컴포넌트를 레지스트리에 등록
|
||||
*/
|
||||
export class TextareaBasicRenderer extends AutoRegisteringComponentRenderer {
|
||||
static componentDefinition = TextareaBasicDefinition;
|
||||
|
||||
render(): React.ReactElement {
|
||||
return <TextareaBasicComponent {...this.props} renderer={this} />;
|
||||
}
|
||||
|
||||
/**
|
||||
* 컴포넌트별 특화 메서드들
|
||||
*/
|
||||
|
||||
// textarea 타입 특화 속성 처리
|
||||
protected getTextareaBasicProps() {
|
||||
const baseProps = this.getWebTypeProps();
|
||||
|
||||
// textarea 타입에 특화된 추가 속성들
|
||||
return {
|
||||
...baseProps,
|
||||
// 여기에 textarea 타입 특화 속성들 추가
|
||||
};
|
||||
}
|
||||
|
||||
// 값 변경 처리
|
||||
protected handleValueChange = (value: any) => {
|
||||
this.updateComponent({ value });
|
||||
};
|
||||
|
||||
// 포커스 처리
|
||||
protected handleFocus = () => {
|
||||
// 포커스 로직
|
||||
};
|
||||
|
||||
// 블러 처리
|
||||
protected handleBlur = () => {
|
||||
// 블러 로직
|
||||
};
|
||||
}
|
||||
|
||||
// 자동 등록 실행
|
||||
TextareaBasicRenderer.registerSelf();
|
||||
|
||||
// Hot Reload 지원 (개발 모드)
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
TextareaBasicRenderer.enableHotReload();
|
||||
}
|
||||
Reference in New Issue
Block a user