Skip to content

Commit 35e6646

Browse files
committed
chore: Better ShortInput, sorta
1 parent e510129 commit 35e6646

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

src/components/molecules/ShortInput.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/components/molecules/TemplateRenderer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import {
1212
import { groupSub } from 'group-sub';
1313
import { ErrorBoundary } from 'react-error-boundary';
1414

15-
import { ShortInput } from '@/components/molecules/ShortInput';
16-
import { LongInput } from '@/components/molecules/LongInput';
15+
import { ShortInput } from '@/components/ui/ShortInput';
16+
import { LongInput } from '@/components/ui/LongInput';
1717
import { Card, CardContent } from '@/components/ui/card';
1818
import { Button } from '@/components/ui/button';
1919
import { StaticEditor } from '@/components/molecules/StaticEditor';

src/components/ui/ShortInput.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export function ShortInput({ onChange }: { onChange: (value: string) => void }) {
2+
return (
3+
<span
4+
contentEditable
5+
className="border border-zinc-300 dark:border-zinc-600 min-w-16 h-auto inline-block"
6+
onInput={e => onChange((e.target as HTMLDivElement).innerText)}
7+
>
8+
&nbsp;
9+
</span>
10+
);
11+
}

0 commit comments

Comments
 (0)