polish/arcana-spells-resize #6

Merged
drew merged 3 commits from polish/arcana-spells-resize into master 2026-06-26 17:54:36 -04:00
2 changed files with 105 additions and 82 deletions
Showing only changes of commit b6d8e34090 - Show all commits

View File

@@ -1335,7 +1335,8 @@ export default function CharacterSheet() {
</thead> </thead>
<tbody> <tbody>
{spells.map((s, i) => ( {spells.map((s, i) => (
<tr key={i}> <React.Fragment key={i}>
<tr className="spell-inputs-row">
<td className="spell-name-col"> <td className="spell-name-col">
<input <input
type="text" type="text"
@@ -1349,19 +1350,6 @@ export default function CharacterSheet() {
) )
} }
/> />
<textarea
placeholder="Notes / effect description…"
value={s.notes || ""}
ref={(el) => { if (el) autoResize(el); }}
onInput={(e) => autoResize(e.currentTarget)}
onChange={(e) =>
setSpells((prev) =>
prev.map((sp, j) =>
j === i ? { ...sp, notes: e.target.value } : sp,
),
)
}
/>
</td> </td>
<td className="spell-mp-col"> <td className="spell-mp-col">
<input <input
@@ -1417,6 +1405,24 @@ export default function CharacterSheet() {
</button> </button>
</td> </td>
</tr> </tr>
<tr className="spell-notes-row">
<td colSpan={5}>
<textarea
placeholder="Notes / effect description…"
value={s.notes || ""}
ref={(el) => { if (el) autoResize(el); }}
onInput={(e) => autoResize(e.currentTarget)}
onChange={(e) =>
setSpells((prev) =>
prev.map((sp, j) =>
j === i ? { ...sp, notes: e.target.value } : sp,
),
)
}
/>
</td>
</tr>
</React.Fragment>
))} ))}
</tbody> </tbody>
</table> </table>

View File

@@ -765,6 +765,23 @@ input[type="number"] {
min-height: 55px; min-height: 55px;
} }
.spell-inputs-row td {
border-bottom: none;
padding-top: 10px;
}
.spell-notes-row td {
padding-top: 0;
padding-bottom: 10px;
}
.spell-notes-row textarea {
display: block;
width: 100%;
min-height: 0;
box-sizing: border-box;
}
.spell-name-col { .spell-name-col {
width: 35%; width: 35%;
} }