This commit is contained in:
lingdocs 2022-02-10 11:40:00 +04:00
parent 243c1a8c58
commit 4429ce0456
2 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ function BookInfoInput({ handleSubmit }: { handleSubmit: (info: { frontmatter: F
<input multiple={false} ref={coverRef} className="form-control" type="file" id="cover-file" accept="image/jpeg,image/png"/> <input multiple={false} ref={coverRef} className="form-control" type="file" id="cover-file" accept="image/jpeg,image/png"/>
</div> </div>
{fields.map((field) => ( {fields.map((field) => (
<div className="mb-2"> <div className="mb-2" key={field}>
<label htmlFor={field} className="form-label d-flex flex-row align-items-center"> <label htmlFor={field} className="form-label d-flex flex-row align-items-center">
{!requiredFields.includes(field) && <span className="me-2"> {!requiredFields.includes(field) && <span className="me-2">
<button type="button" className="btn btn-sm btn-outline-secondary" onClick={() => handleRemoveField(field)}> <button type="button" className="btn btn-sm btn-outline-secondary" onClick={() => handleRemoveField(field)}>
@ -110,7 +110,7 @@ function BookInfoInput({ handleSubmit }: { handleSubmit: (info: { frontmatter: F
options={availableFieldsOptions} options={availableFieldsOptions}
/> />
<LanguageSelect value={state.lang} onChange={handleLanguageChange} /> <LanguageSelect value={state.lang} onChange={handleLanguageChange} />
<button onClick={submit} type="button" className="btn btn-primary my-4">Create .epub</button> <button onClick={submit} type="button" className="btn btn-lg btn-primary my-4">Create .epub</button>
</div> </div>
} }

View File

@ -44,7 +44,7 @@ function LanguageSelect({ value, onChange }: {
/> />
{showingOther && <div className="my-2"> {showingOther && <div className="my-2">
<label htmlFor="otherLang" className="form-label d-flex flex-row align-items-center"> <label htmlFor="otherLang" className="form-label d-flex flex-row align-items-center">
<span>Custom <a href="https://www.w3.org/International/articles/language-tags/" target="_blank">IETF BCP 47</a> Language Code</span> <span>Custom <a href="https://www.w3.org/International/articles/language-tags/" target="_blank" rel="noreferrer">IETF BCP 47</a> Language Code</span>
</label> </label>
{/* TODO: for some reason can't use value={value} with this - but it still works */} {/* TODO: for some reason can't use value={value} with this - but it still works */}
<input onChange={(e) => onChange(e.target.value)} type="text" className="form-control" id="otherLang" /> <input onChange={(e) => onChange(e.target.value)} type="text" className="form-control" id="otherLang" />