Import source: src/components/RightPanel/DownloadSizeSection
Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { useQR } from '../../context/QRContext';
|
||||
import { SegmentedControl } from '../ui/SegmentedControl';
|
||||
import type { DownloadSize } from '../../types';
|
||||
|
||||
const SIZE_OPTIONS: { label: string; value: DownloadSize }[] = [
|
||||
{ label: 'Social', value: 'social' },
|
||||
{ label: 'Card', value: 'card' },
|
||||
{ label: 'Print', value: 'print' },
|
||||
];
|
||||
|
||||
export function DownloadSizeSection() {
|
||||
const { state, dispatch } = useQR();
|
||||
return (
|
||||
<div className="flex flex-col gap-3">
|
||||
<h3 className="text-[14px] font-semibold" style={{ color: 'var(--text-secondary)' }}>Download Size</h3>
|
||||
<SegmentedControl options={SIZE_OPTIONS} value={state.downloadSize}
|
||||
onChange={v => dispatch({ type: 'SET_DOWNLOAD_SIZE', payload: v })} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user