/** * CommonSettingsSection * * Common settings fields shared by all element types. * Label, position, and appear timing. */ import React from 'react'; import FormField from '../FormField'; import type { CommonSettingsSectionProps } from './types'; const CommonSettingsSection: React.FC = ({ label, xPercent, yPercent, appearDelaySec, appearDurationSec, onChange, showLabel = true, showPosition = true, }) => { return (
{showLabel && ( onChange('label', event.target.value)} /> )} {showPosition && (
onChange('xPercent', event.target.value)} /> onChange('yPercent', event.target.value)} />
)}
onChange('appearDelaySec', event.target.value)} /> onChange('appearDurationSec', event.target.value) } placeholder='Leave empty for none' />
); }; export default CommonSettingsSection;