cleanup
This commit is contained in:
parent
0afc2564c2
commit
1243386a64
|
@ -94,7 +94,7 @@ function NPPronounPicker({ onChange, pronoun, asObject, clearButton }: {
|
||||||
}
|
}
|
||||||
const prs = labels(!!asObject)[display];
|
const prs = labels(!!asObject)[display];
|
||||||
const pSpec = "near" in prs ? prs[pronoun.distance] : prs;
|
const pSpec = "near" in prs ? prs[pronoun.distance] : prs;
|
||||||
return <div style={{ maxWidth: "225px", minWidth: "125px", padding: 0 }}>
|
return <div style={{ maxWidth: "225px", padding: 0 }}>
|
||||||
{clearButton}
|
{clearButton}
|
||||||
<div className="d-flex flex-row justify-content-around mb-3">
|
<div className="d-flex flex-row justify-content-around mb-3">
|
||||||
<ButtonSelect
|
<ButtonSelect
|
||||||
|
@ -108,7 +108,7 @@ function NPPronounPicker({ onChange, pronoun, asObject, clearButton }: {
|
||||||
/>
|
/>
|
||||||
<button className="btn btn-sm btn-outline" onClick={handleDisplayChange}>{display === "persons" ? "#" : display === "p" ? "PS" : "EN"}</button>
|
<button className="btn btn-sm btn-outline" onClick={handleDisplayChange}>{display === "persons" ? "#" : display === "p" ? "PS" : "EN"}</button>
|
||||||
</div>
|
</div>
|
||||||
<table className="table table-bordered table-sm" style={{ textAlign: "center", minWidth: "125px", tableLayout: "fixed" }}>
|
<table className="table table-bordered table-sm" style={{ textAlign: "center", minWidth: "100px", tableLayout: "fixed" }}>
|
||||||
<tbody>
|
<tbody>
|
||||||
{pSpec.map((rw, i) => (
|
{pSpec.map((rw, i) => (
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -117,7 +117,10 @@ function NPPronounPicker({ onChange, pronoun, asObject, clearButton }: {
|
||||||
return <td
|
return <td
|
||||||
onClick={() => handleClick(i, j)}
|
onClick={() => handleClick(i, j)}
|
||||||
className={classNames({ "table-active": active })}
|
className={classNames({ "table-active": active })}
|
||||||
style={active ? { backgroundColor: gColors[p.gender] } : {}}
|
style={{
|
||||||
|
backgroundColor: active ? gColors[p.gender] : "inherit",
|
||||||
|
padding: "0.25rem 0",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div className="my-1">
|
<div className="my-1">
|
||||||
{typeof r === "string" ? r : r[p.gender]}
|
{typeof r === "string" ? r : r[p.gender]}
|
||||||
|
|
|
@ -56,7 +56,7 @@ export function PhraseBuilder() {
|
||||||
<div>{` `}</div>
|
<div>{` `}</div>
|
||||||
</div>}
|
</div>}
|
||||||
<div className="d-flex flex-row justify-content-around flex-wrap">
|
<div className="d-flex flex-row justify-content-around flex-wrap">
|
||||||
<div className="mb-2">
|
<div className="my-2">
|
||||||
<div className="h4">Subject {showRole(VPRendered, "subject")}</div>
|
<div className="h4">Subject {showRole(VPRendered, "subject")}</div>
|
||||||
<NPPicker
|
<NPPicker
|
||||||
np={subject}
|
np={subject}
|
||||||
|
@ -64,7 +64,7 @@ export function PhraseBuilder() {
|
||||||
onChange={handleSubjectChange}
|
onChange={handleSubjectChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{verb && (verb.object !== "none") && <div className="mb-2">
|
{verb && (verb.object !== "none") && <div className="my-2">
|
||||||
<div className="h4">Object {showRole(VPRendered, "object")}</div>
|
<div className="h4">Object {showRole(VPRendered, "object")}</div>
|
||||||
<ObjectDisplay
|
<ObjectDisplay
|
||||||
object={verb.object}
|
object={verb.object}
|
||||||
|
@ -72,7 +72,7 @@ export function PhraseBuilder() {
|
||||||
onChange={handleObjectChange}
|
onChange={handleObjectChange}
|
||||||
/>
|
/>
|
||||||
</div>}
|
</div>}
|
||||||
<div className="mb-2">
|
<div className="my-2">
|
||||||
<div className="h4">Verb</div>
|
<div className="h4">Verb</div>
|
||||||
<VerbPicker verbs={verbs} verb={verb} onChange={setVerb} />
|
<VerbPicker verbs={verbs} verb={verb} onChange={setVerb} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,6 +5,4 @@ fullWidth: true
|
||||||
|
|
||||||
import PhraseBuilder from "../../components/phrase-builder/PhraseBuilder";
|
import PhraseBuilder from "../../components/phrase-builder/PhraseBuilder";
|
||||||
|
|
||||||
##### This is under construction... It works but will get better. 🤓
|
|
||||||
|
|
||||||
<PhraseBuilder />
|
<PhraseBuilder />
|
Loading…
Reference in New Issue