gc-wing/apps/web/src/features/map3dSettings/Map3DSettingsToggles.tsx

26 lines
727 B
TypeScript
Raw Normal View 히스토리

import { ToggleButton } from '@wing/ui';
2026-02-15 11:22:38 +09:00
import type { Map3DSettings } from "../../widgets/map3d/Map3D";
type Props = {
value: Map3DSettings;
onToggle: (key: keyof Map3DSettings) => void;
};
export function Map3DSettingsToggles({ value, onToggle }: Props) {
const items: Array<{ id: keyof Map3DSettings; label: string }> = [
{ id: "showShips", label: "선박(Deck)" },
{ id: "showDensity", label: "밀도(3D)" },
{ id: "showSeamark", label: "OpenSeaMap" },
];
return (
<div className="flex flex-wrap gap-0.75 mb-1.5">
2026-02-15 11:22:38 +09:00
{items.map((t) => (
<ToggleButton key={t.id} on={value[t.id]} onClick={() => onToggle(t.id)}>
2026-02-15 11:22:38 +09:00
{t.label}
</ToggleButton>
2026-02-15 11:22:38 +09:00
))}
</div>
);
}