Files
community-rule/app/components/utility/InputLabel/InputLabel.container.tsx
T
2026-02-05 22:37:00 -07:00

41 lines
937 B
TypeScript

"use client";
import { memo } from "react";
import InputLabelView from "./InputLabel.view";
import type { InputLabelProps } from "./InputLabel.types";
import {
normalizeInputLabelSize,
normalizeInputLabelPalette,
} from "../../../../lib/propNormalization";
const InputLabelContainer = memo<InputLabelProps>(
({
label,
helpIcon = false,
asterisk = false,
helperText = false,
size: sizeProp = "S",
palette: paletteProp = "Default",
className = "",
}) => {
const size = normalizeInputLabelSize(sizeProp);
const palette = normalizeInputLabelPalette(paletteProp);
return (
<InputLabelView
label={label}
helpIcon={helpIcon}
asterisk={asterisk}
helperText={helperText}
size={size}
palette={palette}
className={className}
/>
);
},
);
InputLabelContainer.displayName = "InputLabel";
export default InputLabelContainer;