Skip to content

Commit 7afc517

Browse files
Updated custom aspect ratio default and icon
1 parent f571f11 commit 7afc517

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export default function App() {
6262
const [bgDim, setBgDim] = useState(DEFAULT_BG_DIM);
6363
const [fontName, setFontName] = useState('Montserrat');
6464
const [imageType, setImageType] = useState<'cover' | 'poster' | 'custom'>('cover');
65-
const [customAspectRatioWidth, setCustomAspectRatioWidth] = useState(0.75);
66-
const [customAspectRatioHeight, setCustomAspectRatioHeight] = useState(1);
65+
const [customAspectRatioWidth, setCustomAspectRatioWidth] = useState(4);
66+
const [customAspectRatioHeight, setCustomAspectRatioHeight] = useState(3);
6767
const [textColor, setTextColor] = useState('#ffffff');
6868
const [dimColor, setDimColor] = useState('#000000');
6969
const [textAlign, setTextAlign] = useState<TextAlign>('center');

src/components/ImageTypeSelect.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RectangleHorizontal, RectangleVertical } from 'lucide-preact';
1+
import { Fullscreen, RectangleHorizontal, RectangleVertical } from 'lucide-preact';
22
import type { FC } from 'preact/compat';
33

44
interface ImageTypeSelectProps {
@@ -20,7 +20,13 @@ const SelectOption: FC<{
2020
selected ? selectedClasses : ''
2121
}`}
2222
>
23-
{value === 'poster' ? <RectangleVertical /> : <RectangleHorizontal />}
23+
{value === 'poster' ? (
24+
<RectangleVertical />
25+
) : value === 'cover' ? (
26+
<RectangleHorizontal />
27+
) : (
28+
<Fullscreen />
29+
)}
2430
<span>{value.charAt(0).toUpperCase() + value.slice(1)}</span>
2531
</button>
2632
);

0 commit comments

Comments
 (0)