Skip to content

Commit

Permalink
Always wrap element in container element
Browse files Browse the repository at this point in the history
  • Loading branch information
xendk committed Jun 3, 2021
1 parent 5919cd3 commit d3561c5
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions src/apps/order-material/order-material.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,43 @@ function OrderMaterial({
return null;

case "checking":
return <Alert message={checkingText} type="polite" variant="info" />;
return (
<div className="ddb-order-material__container">
<Alert message={checkingText} type="polite" variant="info" />
</div>
);

case "unavailable":
return <Alert message={unavailableText} type="polite" variant="info" />;
return (
<div className="ddb-order-material__container">
<Alert message={unavailableText} type="polite" variant="info" />
</div>
);

case "invalid branch":
return (
<Alert
message={invalidPickupBranchText}
type="polite"
variant="warning"
/>
<div className="ddb-order-material__container">
<Alert
message={invalidPickupBranchText}
type="polite"
variant="warning"
/>
</div>
);

case "processing":
return <Alert message={progressText} type="polite" variant="info" />;
return (
<div className="ddb-order-material__container">
<Alert message={progressText} type="polite" variant="info" />
</div>
);

case "finished":
return (
<>
<Alert message={successText} type="polite" variant="success" />
<div className="ddb-order-material__container">
<Alert message={successText} type="polite" variant="success" />
</div>
<Dialog
label="Tilføj søgning til liste"
showCloseButton
Expand All @@ -67,7 +83,11 @@ function OrderMaterial({
);

case "failed":
return <Alert message={errorText} type="polite" variant="warning" />;
return (
<div className="ddb-order-material__container">
<Alert message={errorText} type="polite" variant="warning" />
</div>
);

default:
return (
Expand Down

0 comments on commit d3561c5

Please sign in to comment.