mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-05 04:59:02 +08:00
18 lines
455 B
JavaScript
18 lines
455 B
JavaScript
import { mergeProps } from "solid-js";
|
|
|
|
export default function UserProfile(props) {
|
|
const merged = mergeProps(
|
|
{ name: "", age: null, favouriteColors: [], isAvailable: false },
|
|
props,
|
|
);
|
|
|
|
return (
|
|
<>
|
|
<p>My name is {merged.name}!</p>
|
|
<p>My age is {merged.age}!</p>
|
|
<p>My favourite colors are {merged.favouriteColors.join(", ")}!</p>
|
|
<p>I am {merged.isAvailable ? "available" : "not available"}</p>
|
|
</>
|
|
);
|
|
}
|