Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(docs): spinner dx #4088

Open
wants to merge 1 commit into
base: refactor/overall-dx
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions apps/docs/content/components/spinner/colors.raw.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {Spinner} from "@nextui-org/react";

export default function App() {
return (
<div className="flex gap-4">
<Spinner color="default" />
<Spinner color="primary" />
<Spinner color="secondary" />
<Spinner color="success" />
<Spinner color="warning" />
<Spinner color="danger" />
</div>
);
}
15 changes: 1 addition & 14 deletions apps/docs/content/components/spinner/colors.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
const App = `import {Spinner} from "@nextui-org/react";

export default function App() {
return (
<div className="flex gap-4">
<Spinner color="default"/>
<Spinner color="primary"/>
<Spinner color="secondary"/>
<Spinner color="success"/>
<Spinner color="warning"/>
<Spinner color="danger"/>
</div>
);
}`;
import App from "./colors.raw.jsx?raw";

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

export default function App() {
return (
<div className="flex gap-4">
<Spinner color="default" label="Default" labelColor="foreground" />
<Spinner color="primary" label="Primary" labelColor="primary" />
<Spinner color="secondary" label="Secondary" labelColor="secondary" />
<Spinner color="success" label="Success" labelColor="success" />
<Spinner color="warning" label="Warning" labelColor="warning" />
<Spinner color="danger" label="Danger" labelColor="danger" />
</div>
);
}
15 changes: 1 addition & 14 deletions apps/docs/content/components/spinner/label-colors.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
const App = `import {Spinner} from "@nextui-org/react";

export default function App() {
return (
<div className="flex gap-4">
<Spinner label="Default" color="default" labelColor="foreground"/>
<Spinner label="Primary" color="primary" labelColor="primary"/>
<Spinner label="Secondary" color="secondary" labelColor="secondary"/>
<Spinner label="Success" color="success" labelColor="success"/>
<Spinner label="Warning" color="warning" labelColor="warning"/>
<Spinner label="Danger" color="danger" labelColor="danger"/>
</div>
);
}`;
import App from "./label-colors.raw.jsx?raw";

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

export default function App() {
return <Spinner color="warning" label="Loading..." />;
}
8 changes: 1 addition & 7 deletions apps/docs/content/components/spinner/label.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
const App = `import {Spinner} from "@nextui-org/react";

export default function App() {
return (
<Spinner label="Loading..." color="warning" />
);
}`;
import App from "./label.raw.jsx?raw";

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

export default function App() {
return (
<div className="flex gap-4">
<Spinner size="sm" />
<Spinner size="md" />
<Spinner size="lg" />
</div>
);
}
12 changes: 1 addition & 11 deletions apps/docs/content/components/spinner/sizes.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
const App = `import {Spinner} from "@nextui-org/react";

export default function App() {
return (
<div className="flex gap-4">
<Spinner size="sm" />
<Spinner size="md" />
<Spinner size="lg" />
</div>
);
}`;
import App from "./sizes.raw.jsx?raw";

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

export default function App() {
return <Spinner />;
}
8 changes: 1 addition & 7 deletions apps/docs/content/components/spinner/usage.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
const App = `import {Spinner} from "@nextui-org/react";

export default function App() {
return (
<Spinner />
);
}`;
import App from "./usage.raw.jsx?raw";

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