Skip to content

Commit

Permalink
Wrapping inputs inside div
Browse files Browse the repository at this point in the history
  • Loading branch information
netojose committed Apr 2, 2020
1 parent 5ab060a commit a846169
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@netojose/react-select-datepicker",
"version": "1.0.1",
"version": "1.0.2",
"description": "A lightweight select date picker",
"main": "./dist/index.js",
"license": "MIT",
Expand Down
29 changes: 15 additions & 14 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,21 @@ export default ({

return (
<div className={cls} css={css}>
{fields.map(field => (
<Field
key={field}
items={options[field]}
label={labels[field]}
showLabel={showLabels}
value={values[field]}
onChange={handleChange}
name={field}
renderOption={field === "day" ? v => dayPad(v) : null}
generateValue={field === "month" ? (_, index) => index : null}
/>
))}

<div>
{fields.map(field => (
<Field
key={field}
items={options[field]}
label={labels[field]}
showLabel={showLabels}
value={values[field]}
onChange={handleChange}
name={field}
renderOption={field === "day" ? v => dayPad(v) : null}
generateValue={field === "month" ? (_, index) => index : null}
/>
))}
</div>
{validationError && showErrors && <p>{errors[validationError]}</p>}
</div>
);
Expand Down

0 comments on commit a846169

Please sign in to comment.