/** * @file Group opacity section */ import * as React from "react"; import { InspectorLabel } from "../../inspector/parts/InspectorLabel"; import { useI18n } from "../../../i18n/context"; import styles from "./GroupOpacitySection.module.css"; type GroupOpacitySectionProps = { opacity: number; onOpacityChange: (opacity: number) => void; }; /** * Section for group opacity settings */ export function GroupOpacitySection({ opacity, onOpacityChange, }: GroupOpacitySectionProps): React.ReactElement { const { t } = useI18n(); const handleChange = React.useEffectEvent((e: React.ChangeEvent) => { onOpacityChange(Number(e.target.value)); }); return (
{t("fieldOpacity") || "Opacity"} {Math.round(opacity * 100)}%
); }