refactor icons. Somehow button colors are no longer working...
This commit is contained in:
parent
a224397079
commit
3f075d509b
16 changed files with 152 additions and 110 deletions
|
|
@ -2,9 +2,10 @@ import { useState } from "react"
|
|||
import type { RecipeModel } from "../../models/RecipeModel"
|
||||
import type { IngredientGroupModel } from "../../models/IngredientGroupModel"
|
||||
import { IngredientGroupListEditor } from "./IngredientGroupListEditor"
|
||||
import Button, { ButtonType } from "../basics/Button"
|
||||
import Button from "../basics/Button"
|
||||
import { InstructionStepListEditor } from "./InstructionStepListEditor"
|
||||
import type { InstructionStepModel } from "../../models/InstructionStepModel"
|
||||
import { ButtonType } from "../basics/BasicButtonDefinitions"
|
||||
|
||||
type RecipeEditorProps = {
|
||||
recipe: RecipeModel
|
||||
|
|
@ -91,7 +92,7 @@ export default function RecipeEditor({ recipe, onSave, onCancel }: RecipeEditorP
|
|||
{/* Title */}
|
||||
<h3 className="subsection-heading">Title</h3>
|
||||
<input
|
||||
className={`input-field ${errors.title ? "border-red-500" : ""}`}
|
||||
className={`input-field ${errors.title ? "error-text" : ""}`}
|
||||
placeholder="Title"
|
||||
value={draft.title}
|
||||
onChange={e => setDraft({ ...draft, title: e.target.value })}
|
||||
|
|
@ -123,7 +124,7 @@ export default function RecipeEditor({ recipe, onSave, onCancel }: RecipeEditorP
|
|||
/>
|
||||
</div>
|
||||
{/* Ingredient List - @todo better visualization of errors! */}
|
||||
<div className={errors.ingredients ? "border border-red-500 rounded p-2" : ""}>
|
||||
<div className={errors.ingredients ? "border error-text rounded p-2" : ""}>
|
||||
<IngredientGroupListEditor
|
||||
ingredientGroupList={draft.ingredientGroupList}
|
||||
onChange={updateIngredientGroupList}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue