better
This commit is contained in:
parent
051d8a0b72
commit
8cb6badd18
|
@ -55,7 +55,7 @@ function VerbPicker({ onChange, subject, changeSubject, verb, verbs }: {
|
||||||
}
|
}
|
||||||
return <div className="mb-3">
|
return <div className="mb-3">
|
||||||
<div style={{ maxWidth: "300px", margin: "0 auto" }}>
|
<div style={{ maxWidth: "300px", margin: "0 auto" }}>
|
||||||
<div>Verb:</div>
|
<div className="h5">Verb:</div>
|
||||||
<EntrySelect
|
<EntrySelect
|
||||||
entries={verbs}
|
entries={verbs}
|
||||||
value={verb?.verb}
|
value={verb?.verb}
|
||||||
|
|
|
@ -43,11 +43,10 @@ function NPPicker({ np, onChange, counterPart, asObject }: {
|
||||||
const isDynamicComplement = np && np.type === "noun" && np.dynamicComplement;
|
const isDynamicComplement = np && np.type === "noun" && np.dynamicComplement;
|
||||||
const clearButton = <button className="btn btn-sm btn-light mb-2" onClick={handleClear}>X</button>;
|
const clearButton = <button className="btn btn-sm btn-light mb-2" onClick={handleClear}>X</button>;
|
||||||
return <div>
|
return <div>
|
||||||
{!npType && <div className="d-flex flex-row align-items-center text-center mt-3">
|
{!npType && <div className="text-center mt-3">
|
||||||
<div className="h6 mr-3">
|
{/* <div className="h6 mr-3">
|
||||||
Choose NP
|
Choose NP
|
||||||
</div>
|
</div> */}
|
||||||
<div className="ml-3">
|
|
||||||
{npTypes.map((npt) => <div className="mb-2">
|
{npTypes.map((npt) => <div className="mb-2">
|
||||||
<button
|
<button
|
||||||
key={npt}
|
key={npt}
|
||||||
|
@ -58,7 +57,6 @@ function NPPicker({ np, onChange, counterPart, asObject }: {
|
||||||
{npt}
|
{npt}
|
||||||
</button>
|
</button>
|
||||||
</div>)}
|
</div>)}
|
||||||
</div>
|
|
||||||
</div>}
|
</div>}
|
||||||
{(npType === "pronoun" && np?.type === "pronoun")
|
{(npType === "pronoun" && np?.type === "pronoun")
|
||||||
? <PronounPicker
|
? <PronounPicker
|
||||||
|
|
|
@ -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", padding: 0 }}>
|
return <div style={{ maxWidth: "145px", 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
|
||||||
|
|
|
@ -14,6 +14,8 @@ const servantEmoji = "🙇♂️";
|
||||||
|
|
||||||
// TODO: SHOW KING AND SERVANT ONCE TENSE PICKED, EVEN IF NPs not selected
|
// TODO: SHOW KING AND SERVANT ONCE TENSE PICKED, EVEN IF NPs not selected
|
||||||
// TODO: Issue with "the money were taken"
|
// TODO: Issue with "the money were taken"
|
||||||
|
// TODO: Use the same component for PronounPicker and NPPronounPicker (sizing issue)
|
||||||
|
// get the practice pronoun picker page into a typesafe file
|
||||||
|
|
||||||
// TODO: error handling on error with rendering etc
|
// TODO: error handling on error with rendering etc
|
||||||
export function PhraseBuilder() {
|
export function PhraseBuilder() {
|
||||||
|
@ -57,15 +59,14 @@ export function PhraseBuilder() {
|
||||||
onChange={setVerb}
|
onChange={setVerb}
|
||||||
/>
|
/>
|
||||||
{(verb && (typeof verb.object === "object") && (verb.isCompound !== "dynamic")) &&
|
{(verb && (typeof verb.object === "object") && (verb.isCompound !== "dynamic")) &&
|
||||||
<div className="d-flex flex-row justify-content-around flex-wrap mt-4">
|
<div className="text-center mt-4">
|
||||||
<button onClick={handleSubjObjSwap} className="btn btn-sm btn-light">
|
<button onClick={handleSubjObjSwap} className="btn btn-sm btn-light">
|
||||||
<i className="fas fa-exchange-alt mr-2" /> subj/obj
|
<i className="fas fa-exchange-alt mr-2" /> subj/obj
|
||||||
</button>
|
</button>
|
||||||
{/* <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" style={{ marginLeft: "-0.5rem", marginRight: "-0.5rem" }}>
|
||||||
<div className="my-2">
|
<div className="my-2">
|
||||||
<div className="h4">Subject {showRole(VPRendered, "subject")}</div>
|
<div className="h5 text-center">Subject {showRole(VPRendered, "subject")}</div>
|
||||||
<NPPicker
|
<NPPicker
|
||||||
np={subject}
|
np={subject}
|
||||||
counterPart={verb ? verb.object : undefined}
|
counterPart={verb ? verb.object : undefined}
|
||||||
|
@ -73,7 +74,7 @@ export function PhraseBuilder() {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{verb && (verb.object !== "none") && <div className="my-2">
|
{verb && (verb.object !== "none") && <div className="my-2">
|
||||||
<div className="h4">Object {showRole(VPRendered, "object")}</div>
|
<div className="h5 text-center">Object {showRole(VPRendered, "object")}</div>
|
||||||
{(typeof verb.object === "number")
|
{(typeof verb.object === "number")
|
||||||
? <div className="text-muted">Unspoken 3rd Pers. Masc. Plur.</div>
|
? <div className="text-muted">Unspoken 3rd Pers. Masc. Plur.</div>
|
||||||
: <NPPicker
|
: <NPPicker
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,7 @@
|
||||||
module.exports = [
|
module.exports = [
|
||||||
|
{
|
||||||
|
"ts": 1527819182,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ts": 1527812403
|
"ts": 1527812403
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue