mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-20 09:43:37 +02:00
- Add uload project with apps/web structure
- Reorganize from flat to monorepo structure
- Remove PocketBase binary and local data
- Update to pnpm and @uload/web namespace
- Add picture project to monorepo
- Remove embedded git repository
- Unify all package names to @{project}/{app} schema:
- @maerchenzauber/* (was @storyteller/*)
- @manacore/* (was manacore-*, manacore)
- @manadeck/* (was web, backend, manadeck)
- @memoro/* (was memoro-web, landing, memoro)
- @picture/* (already unified)
- @uload/web
- Add convenient dev scripts for all apps:
- pnpm dev:{project}:web
- pnpm dev:{project}:landing
- pnpm dev:{project}:mobile
- pnpm dev:{project}:backend
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
import React from 'react';
|
||
import { OptionSelector, OptionItem } from './OptionSelector';
|
||
|
||
export type AspectRatio = {
|
||
label: string;
|
||
value: string;
|
||
width: number;
|
||
height: number;
|
||
icon: string;
|
||
};
|
||
|
||
type AspectRatioSelectorProps = {
|
||
aspectRatios: AspectRatio[];
|
||
selectedAspectRatio: AspectRatio;
|
||
onSelectAspectRatio: (ratio: AspectRatio) => void;
|
||
disabled?: boolean;
|
||
};
|
||
|
||
export function AspectRatioSelector({
|
||
aspectRatios,
|
||
selectedAspectRatio,
|
||
onSelectAspectRatio,
|
||
disabled = false,
|
||
}: AspectRatioSelectorProps) {
|
||
// Convert aspect ratios to OptionItems
|
||
const options: OptionItem[] = aspectRatios.map(ratio => ({
|
||
id: ratio.value,
|
||
label: ratio.label,
|
||
subtitle: `${ratio.width}×${ratio.height}`,
|
||
}));
|
||
|
||
// Handle selection
|
||
const handleSelect = (option: OptionItem) => {
|
||
const ratio = aspectRatios.find(r => r.value === option.id);
|
||
if (ratio) {
|
||
onSelectAspectRatio(ratio);
|
||
}
|
||
};
|
||
|
||
return (
|
||
<OptionSelector
|
||
options={options}
|
||
selectedId={selectedAspectRatio.value}
|
||
onSelect={handleSelect}
|
||
disabled={disabled}
|
||
minWidth={80}
|
||
title="Seitenverhältnis"
|
||
/>
|
||
);
|
||
}
|