mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
59 lines
1.9 KiB
TypeScript
59 lines
1.9 KiB
TypeScript
const App = `import {Card, CardHeader, CardBody, Avatar, Button} from "@nextui-org/react";
|
|
|
|
export default function App() {
|
|
const [isFollowed, setIsFollowed] = React.useState(false);
|
|
|
|
return (
|
|
<Card className="max-w-[340px]">
|
|
<CardHeader className="justify-between">
|
|
<div className="flex gap-5">
|
|
<Avatar isBordered radius="full" size="md" src="/avatars/avatar-1.png" />
|
|
<div className="flex flex-col gap-1 items-start justify-center">
|
|
<h4 className="text-sm font-semibold leading-none text-default-600">Zoey Lang</h4>
|
|
<h5 className="text-sm tracking-tight text-default-400">@zoeylang</h5>
|
|
</div>
|
|
</div>
|
|
<Button
|
|
className={isFollowed ? "bg-transparent text-foreground border-default-200" : ""}
|
|
color="primary"
|
|
radius="full"
|
|
size="sm"
|
|
variant={isFollowed ? "bordered" : "solid"}
|
|
onPress={() => setIsFollowed(!isFollowed)}
|
|
>
|
|
{isFollowed ? "Unfollow" : "Follow"}
|
|
</Button>
|
|
</CardHeader>
|
|
<CardBody className="px-3 py-0 text-sm text-default-400">
|
|
<p>
|
|
Frontend developer and UI/UX enthusiast. Join me on this coding adventure!
|
|
</p>
|
|
<span className="pt-2">
|
|
#FrontendWithZoey
|
|
<span className="py-2" aria-label="computer" role="img">
|
|
💻
|
|
</span>
|
|
</span>
|
|
</CardBody>
|
|
<CardFooter className="gap-3">
|
|
<div className="flex gap-1">
|
|
<p className="font-semibold text-default-400 text-sm">4</p>
|
|
<p className=" text-default-400 text-sm">Following</p>
|
|
</div>
|
|
<div className="flex gap-1">
|
|
<p className="font-semibold text-default-400 text-sm">97.1K</p>
|
|
<p className="text-default-400 text-sm">Followers</p>
|
|
</div>
|
|
</CardFooter>
|
|
</Card>
|
|
);
|
|
}`;
|
|
|
|
const react = {
|
|
"/App.jsx": App,
|
|
};
|
|
|
|
export default {
|
|
...react,
|
|
};
|