Skip to content

Commit

Permalink
Adjust placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
khoidt committed Mar 11, 2024
1 parent 6ade26c commit 8807a77
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/fragmentarium/ui/ProvenanceSearchForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ export default withData<
{
onChange: (value: string | null) => void
value?: string | null
placeholder?: string
},
{ fragmentService: FragmentService },
ReadonlyArray<ReadonlyArray<string>>
>(
({ data, value, onChange }) => {
({ data, value, placeholder, onChange }) => {
const options = data.map((site) => ({
value: site.join(' '),
label: site.join(' '),
Expand All @@ -22,7 +23,7 @@ export default withData<
return (
<Select
aria-label="select-provenance"
placeholder="Provenance"
placeholder={placeholder ?? 'Provenance'}
options={options}
value={defaultOption}
onChange={(selection) => {
Expand Down
8 changes: 6 additions & 2 deletions src/fragmentarium/ui/fragment/ColophonEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ const ColophonEditor: React.FC<Props> = ({
updateColophon,
fragmentService,
}) => {
// ToDo: Implement commented out
//const { colophon } = fragment
// ToDo:
// - Implement commented out as state attributes
// - Implement onChange for each input

// const { colophon } = fragment
const [formData, setFormData] = useState<Colophon>({
colophonStatus: ColophonStatus.No, //colophon?.colophonStatus || ColophonStatus.No,
colophonOwnership: ColophonOwnership.Library, //fragment.colophon?.colophonOwnership || ColophonOwnership.Library,
Expand Down Expand Up @@ -220,6 +223,7 @@ const ColophonEditor: React.FC<Props> = ({
return new Promise(() => empty)
}}
/>
{/* ToDo: Implement `notes to scribal process as a text input field`*/}
<Button
variant="primary"
type="submit"
Expand Down
5 changes: 5 additions & 0 deletions src/fragmentarium/ui/fragment/ColophonEditorInputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const ProvenanceAttestationInput = ({
fragmentService={fragmentService}
onChange={onChange}
value={provenanceAttestation?.value?.name}
placeholder={_.startCase(name)}
/>
<Row>
<BrokenAndUncertainSwitches
Expand Down Expand Up @@ -64,6 +65,7 @@ export const ColophonStatusInput = ({
value={{ value: colophonStatus, label: colophonStatus }}
onChange={onChange('colophonStatus')}
isClearable={true}
placeholder="Status"
/>
</Form.Group>
)
Expand Down Expand Up @@ -93,6 +95,7 @@ export const ColophonOwnershipInput = ({
]}
onChange={onChange('colophonOwnership')}
isClearable={true}
placeholder="Ownership"
/>
</Form.Group>
)
Expand All @@ -117,6 +120,7 @@ export const ColophonTypeInput = ({
values={[{ value: colophonType ?? '', label: colophonType ?? '' }]}
onChange={onChange}
isClearable={true}
placeholder="Type"
/>
</Form.Group>
)
Expand Down Expand Up @@ -144,6 +148,7 @@ export const ColophonOriginalFromInput = ({
setBroken,
setUncertain,
name: 'originalFrom',
placeholder: 'Ownership',
}}
/>
)
Expand Down

0 comments on commit 8807a77

Please sign in to comment.