|
@@ -321,17 +321,20 @@ const RecipeForm = <T extends Recipe|DBRecipe>({ initialValues, onSubmit }: Reci
|
|
|
</section>
|
|
</section>
|
|
|
|
|
|
|
|
<h5>Instructions</h5>
|
|
<h5>Instructions</h5>
|
|
|
- <section>
|
|
|
|
|
|
|
+ <section className='instructions-set'>
|
|
|
<FieldArray name='instructions'>
|
|
<FieldArray name='instructions'>
|
|
|
{({ remove, push }) => (
|
|
{({ remove, push }) => (
|
|
|
<div>
|
|
<div>
|
|
|
{
|
|
{
|
|
|
values.instructions.map((instruction, instructionIdx) => (
|
|
values.instructions.map((instruction, instructionIdx) => (
|
|
|
<Row key={instructionIdx}>
|
|
<Row key={instructionIdx}>
|
|
|
- <Cell columns={11}>
|
|
|
|
|
- <Field name={`instructions[${instructionIdx}]`}/>
|
|
|
|
|
|
|
+ <Cell columns={11} className='instructions-set__text'>
|
|
|
|
|
+ <div className='instructions-set__text__number'>
|
|
|
|
|
+ {instructionIdx + 1}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <FormikTextarea name={`instructions[${instructionIdx}]`}/>
|
|
|
</Cell>
|
|
</Cell>
|
|
|
- <Cell columns={1}>
|
|
|
|
|
|
|
+ <Cell columns={1} className='instructions-set__action'>
|
|
|
<Button icon='clear' onClick={() => remove(instructionIdx)} small></Button>
|
|
<Button icon='clear' onClick={() => remove(instructionIdx)} small></Button>
|
|
|
</Cell>
|
|
</Cell>
|
|
|
</Row>
|
|
</Row>
|