Skip to content

Commit

Permalink
Changed 24
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed Jun 21, 2023
1 parent f73001d commit 245283a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,31 @@ type ModalProps =
*/
export const Modal = (props: ModalProps) => {
if (props.variant === "no-title") {
return <div>No title</div>;
return (
<div>
<span>No title</span>
<button
style={{
backgroundColor: props.buttonColor,
}}
>
Click me!
</button>
</div>
);
} else {
return <div>Title: {props.title}</div>;
return (
<div>
<span>Title: {props.title}</span>
<button
style={{
backgroundColor: props.buttonColor,
}}
>
Click me!
</button>
</div>
);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,31 @@ type ModalProps = (

export const Modal = (props: ModalProps) => {
if (props.variant === "no-title") {
return <div>No title</div>;
return (
<div>
<span>No title</span>
<button
style={{
backgroundColor: props.buttonColor,
}}
>
Click me!
</button>
</div>
);
} else {
return <div>Title: {props.title}</div>;
return (
<div>
<span>Title: {props.title}</span>
<button
style={{
backgroundColor: props.buttonColor,
}}
>
Click me!
</button>
</div>
);
}
};

Expand Down

0 comments on commit 245283a

Please sign in to comment.