57 lines
1.4 KiB
TypeScript
57 lines
1.4 KiB
TypeScript
|
|
"use client";
|
||
|
|
|
||
|
|
import React from "react";
|
||
|
|
import { AutoRegisteringComponentRenderer } from "../../AutoRegisteringComponentRenderer";
|
||
|
|
import { RadioBasicDefinition } from "./index";
|
||
|
|
import { RadioBasicComponent } from "./RadioBasicComponent";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* RadioBasic 렌더러
|
||
|
|
* 자동 등록 시스템을 사용하여 컴포넌트를 레지스트리에 등록
|
||
|
|
*/
|
||
|
|
export class RadioBasicRenderer extends AutoRegisteringComponentRenderer {
|
||
|
|
static componentDefinition = RadioBasicDefinition;
|
||
|
|
|
||
|
|
render(): React.ReactElement {
|
||
|
|
return <RadioBasicComponent {...this.props} renderer={this} />;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 컴포넌트별 특화 메서드들
|
||
|
|
*/
|
||
|
|
|
||
|
|
// radio 타입 특화 속성 처리
|
||
|
|
protected getRadioBasicProps() {
|
||
|
|
const baseProps = this.getWebTypeProps();
|
||
|
|
|
||
|
|
// radio 타입에 특화된 추가 속성들
|
||
|
|
return {
|
||
|
|
...baseProps,
|
||
|
|
// 여기에 radio 타입 특화 속성들 추가
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
// 값 변경 처리
|
||
|
|
protected handleValueChange = (value: any) => {
|
||
|
|
this.updateComponent({ value });
|
||
|
|
};
|
||
|
|
|
||
|
|
// 포커스 처리
|
||
|
|
protected handleFocus = () => {
|
||
|
|
// 포커스 로직
|
||
|
|
};
|
||
|
|
|
||
|
|
// 블러 처리
|
||
|
|
protected handleBlur = () => {
|
||
|
|
// 블러 로직
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
// 자동 등록 실행
|
||
|
|
RadioBasicRenderer.registerSelf();
|
||
|
|
|
||
|
|
// Hot Reload 지원 (개발 모드)
|
||
|
|
if (process.env.NODE_ENV === "development") {
|
||
|
|
RadioBasicRenderer.enableHotReload();
|
||
|
|
}
|