David Gonzalez e308198644
fix(docs): replace twitter logo/links with x logo/links (#3815)
* fix(docs): replace Twitter logo/links with X logo/links

* docs: update twitter references to x

* docs: update changeset for twitter to x changes

* docs: update twitter references to x

* docs: update twitter references to x

* chore(docs): undo .sponsorsrc since it's generated

* refactor(docs): remove unnecessary classes

* chore(docs): undo .sponsorsrc since it's generated

---------

Co-authored-by: WK Wong <wingkwong.code@gmail.com>
2024-09-29 13:44:07 +08:00

58 lines
1.5 KiB
TypeScript

const App = `import {Checkbox, Link, User, Chip, cn} from "@nextui-org/react";
export default function App() {
const [isSelected, setIsSelected] = React.useState(false);
const user = {
name: "Junior Garcia",
avatar: "https://avatars.githubusercontent.com/u/30373425?v=4",
username: "jrgarciadev",
url: "https://x.com/jrgarciadev",
role: "Software Developer",
status: "Active",
}
return (
<Checkbox
aria-label={user.name}
classNames={{
base: cn(
"inline-flex w-full max-w-md bg-content1",
"hover:bg-content2 items-center justify-start",
"cursor-pointer rounded-lg gap-2 p-4 border-2 border-transparent",
"data-[selected=true]:border-primary",
),
label: "w-full",
}}
isSelected={isSelected}
onValueChange={setIsSelected}
>
<div className="w-full flex justify-between gap-2">
<User
avatarProps={{size: "md", src: user.avatar}}
description={
<Link isExternal href={user.url} size="sm">
@{user.username}
</Link>
}
name={user.name}
/>
<div className="flex flex-col items-end gap-1">
<span className="text-tiny text-default-500">{user.role}</span>
<Chip color="success" size="sm" variant="flat">
{user.status}
</Chip>
</div>
</div>
</Checkbox>
);
}`;
const react = {
"/App.jsx": App,
};
export default {
...react,
};