Name things better.

pull/230/head
Atul Varma 2021-09-27 17:17:43 -04:00
rodzic c525ba1548
commit 146dfc9796
1 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -18,7 +18,7 @@ import {
iterAttachmentPoints, iterAttachmentPoints,
} from "../../specs"; } from "../../specs";
import { Random } from "../../random"; import { Random } from "../../random";
import { range } from "../../util"; import { capitalize, range } from "../../util";
import { AutoSizingSvg } from "../../auto-sizing-svg"; import { AutoSizingSvg } from "../../auto-sizing-svg";
import { ExportWidget } from "../../export-svg"; import { ExportWidget } from "../../export-svg";
@ -332,10 +332,11 @@ const CreaturePartEditor: React.FC<{
style.color = "gray"; style.color = "gray";
title = `Symbol defines a ${type} but cluster doesn't provide one`; title = `Symbol defines a ${type} but cluster doesn't provide one`;
} }
const typeCap = capitalize(type);
return ( return (
<div key={type}> <div key={type}>
<div style={style} title={title}> <div style={style} title={title}>
{type} {typeCap} attachments
</div> </div>
{creatureAttachments.map((attach, i) => { {creatureAttachments.map((attach, i) => {
const atIdPrefix = `${idPrefix}_${type}_${i}_`; const atIdPrefix = `${idPrefix}_${type}_${i}_`;
@ -348,7 +349,9 @@ const CreaturePartEditor: React.FC<{
}} }}
> >
<div className="flex-widget"> <div className="flex-widget">
<label htmlFor={`${atIdPrefix}_indices`}>Indices:</label> <label htmlFor={`${atIdPrefix}_indices`}>
{typeCap} attachment point indices:
</label>
<input <input
id={`${atIdPrefix}_indices`} id={`${atIdPrefix}_indices`}
type="text" type="text"