ERP-node/frontend/lib/registry/components/radio-basic/RadioBasicRenderer.tsx

57 lines
1.4 KiB
TypeScript
Raw Normal View History

2025-09-11 18:38:28 +09:00
"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();
}