Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use text for image keyword fields #30

Merged
merged 1 commit into from
Mar 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions src/Components/FormCard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';

import { IMAGE_SEARCH_OPTIONS } from '../constants';

/**
* Return an array of option components.
*
Expand Down Expand Up @@ -39,8 +37,6 @@ function FormCard(props) {
onChangeBgImage
} = props;

const options = mkOptions(IMAGE_SEARCH_OPTIONS);

return (
<div className="card">
<div className="card-content">
Expand Down Expand Up @@ -119,26 +115,39 @@ function FormCard(props) {
Main image
</label>
<div className="control">
<div className="select" id="main-image-input" name="main-image-input">
<select value={mainImage} onChange={(e) => onChangeMainImage(e.target.value)}>
{options}
</select>
</div>
<p className="help">Used for the profile image.</p>
<input
className="input"
id="main-image-input"
name="main-image-input"
type="text"
placeholder="Search keywords"
size="30"
maxLength="30"
value={mainImage}
onChange={(e) => onChangeMainImage(e.target.value)}
/>
</div>
<p class="help">Use one or more lower-case terms. Separate with commas and no spaces.</p>
</div>

<div className="field">
<label className="label" htmlFor="bg-image-input">
Background image
</label>
<div className="control">
<div className="select" id="bg-image-input" name="bg-image-input">
<select value={bgImage} onChange={(e) => onChangeBgImage(e.target.value)}>
{options}
</select>
</div>
<input
className="input"
id="bg-image-input"
name="bg-image-input"
type="text"
placeholder="Search keywords"
size="30"
maxLength="30"
value={bgImage}
onChange={(e) => onChangeBgImage(e.target.value)}
/>
</div>
<p class="help">Use one or more lower-case terms. Separate with commas and no spaces.</p>
</div>
</div>
</div>
Expand Down