Skip to content

Commit

Permalink
Rewind: make the settings a bit more accessible on smol screens
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelcmtd committed Jan 31, 2024
1 parent 9529903 commit 9af6a5a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export default function Input({ error, placeholder, value, setValue, className }
return <div className={className}>
<input type="text" spellcheck={false} autocorrect="false"
placeholder={placeholder} value={value} onInput={(e) => setValue(e.target.value)} />
<span style={{ color: "red" }}>{error}</span>
{error && <span style={{ color: "red" }}>{error}</span>}
</div>;
}
2 changes: 1 addition & 1 deletion src/components/Kink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function Kink({ kink: [kink, positions, , description], ratings,
<tr class={styles.tr}>
<td class={styles.td}>
<span>{kink}</span>
<span class={styles.desc}>{description}</span>
{description && <span class={styles.desc}>{description}</span>}
</td>
{positions.map((pos, p) => (
<td class={styles.td}>
Expand Down
11 changes: 10 additions & 1 deletion src/components/Rewind.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,21 @@
}

.settings {
flex-wrap: wrap;
display: flex;
flex-flow: row wrap;
width: 63.2em;
justify-content: space-between;
padding: 1em 0;
}

@media screen and (width <= 600px) {
.settings {
flex-direction: column;
font-size: 2.5em;
width: 25.28em;
}
}

.sexrewind {
width: 7.5em;
height: 7.5em;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Rewind.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function Rewind() {
const [sexmins, setSexmins] = useState("0");
const [sexpartners, setSexpartners] = useState("0");
return <main class={styles.main}>
<div class={styles.settings + " " + styles.row}>
<div class={styles.settings}>
<Input placeholder="You had sex" value={sextimes} setValue={setSextimes} />
<Input placeholder="Description" value={sexdesc} setValue={setSexdesc} />
<Input placeholder="Minutes had sex" value={sexmins} setValue={setSexmins} />
Expand Down

0 comments on commit 9af6a5a

Please sign in to comment.