Skip to content

Commit

Permalink
refactor(docs): usage dx (#4036)
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong authored Nov 13, 2024
1 parent 9c38799 commit e44916c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 30 deletions.
17 changes: 17 additions & 0 deletions apps/docs/content/components/user/link-description.raw.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {User, Link} from "@nextui-org/react";

export default function App() {
return (
<User
avatarProps={{
src: "https://avatars.githubusercontent.com/u/30373425?v=4",
}}
description={
<Link isExternal href="https://x.com/jrgarciadev" size="sm">
@jrgarciadev
</Link>
}
name="Junior Garcia"
/>
);
}
18 changes: 1 addition & 17 deletions apps/docs/content/components/user/link-description.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
const App = `import {User, Link} from "@nextui-org/react";
export default function App() {
return (
<User
name="Junior Garcia"
description={(
<Link href="https://x.com/jrgarciadev" size="sm" isExternal>
@jrgarciadev
</Link>
)}
avatarProps={{
src: "https://avatars.githubusercontent.com/u/30373425?v=4"
}}
/>
);
}`;
import App from "./link-description.raw.jsx?raw";

const react = {
"/App.jsx": App,
Expand Down
13 changes: 13 additions & 0 deletions apps/docs/content/components/user/usage.raw.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import {User} from "@nextui-org/react";

export default function App() {
return (
<User
avatarProps={{
src: "https://i.pravatar.cc/150?u=a04258114e29026702d",
}}
description="Product Designer"
name="Jane Doe"
/>
);
}
14 changes: 1 addition & 13 deletions apps/docs/content/components/user/usage.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
const App = `import {User} from "@nextui-org/react";
export default function App() {
return (
<User
name="Jane Doe"
description="Product Designer"
avatarProps={{
src: "https://i.pravatar.cc/150?u=a04258114e29026702d"
}}
/>
);
}`;
import App from "./usage.raw.jsx?raw";

const react = {
"/App.jsx": App,
Expand Down

0 comments on commit e44916c

Please sign in to comment.