((props, ref) => {
- const {
- domRef,
- children,
- spinnerSize,
- spinner = ,
- spinnerPlacement,
- startContent,
- endContent,
- isLoading,
- disableRipple,
- getButtonProps,
- getRippleProps,
- } = useButton({
- ref,
- ...props,
- });
-
- const {ripples, onClear} = getRippleProps();
-
- return (
-
- );
-});
-
-MyButton.displayName = "MyButton";
-
-export default MyButton;`;
+import App from "./custom-impl.raw.jsx?raw";
+import AppTs from "./custom-impl.raw.tsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/button/custom-styles.raw.jsx b/apps/docs/content/components/button/custom-styles.raw.jsx
new file mode 100644
index 0000000000..cd999fa238
--- /dev/null
+++ b/apps/docs/content/components/button/custom-styles.raw.jsx
@@ -0,0 +1,12 @@
+import {Button} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/button/custom-styles.ts b/apps/docs/content/components/button/custom-styles.ts
index b2136ec09f..da3ea9093a 100644
--- a/apps/docs/content/components/button/custom-styles.ts
+++ b/apps/docs/content/components/button/custom-styles.ts
@@ -1,12 +1,4 @@
-const App = `import {Button} from "@nextui-org/react";
-
-export default function App() {
- return (
-
- );
-}`;
+import App from "./custom-styles.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/button/disabled.raw.jsx b/apps/docs/content/components/button/disabled.raw.jsx
new file mode 100644
index 0000000000..9d59145f8c
--- /dev/null
+++ b/apps/docs/content/components/button/disabled.raw.jsx
@@ -0,0 +1,9 @@
+import {Button} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/button/disabled.ts b/apps/docs/content/components/button/disabled.ts
index 57dbe8b255..1a215cc91f 100644
--- a/apps/docs/content/components/button/disabled.ts
+++ b/apps/docs/content/components/button/disabled.ts
@@ -1,12 +1,4 @@
-const App = `import {Button} from "@nextui-org/react";
-
-export default function App() {
- return (
-
- );
-}`;
+import App from "./disabled.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/button/group-disabled.raw.jsx b/apps/docs/content/components/button/group-disabled.raw.jsx
new file mode 100644
index 0000000000..f42ab62dff
--- /dev/null
+++ b/apps/docs/content/components/button/group-disabled.raw.jsx
@@ -0,0 +1,11 @@
+import {Button, ButtonGroup} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+
+
+
+
+ );
+}
diff --git a/apps/docs/content/components/button/group-disabled.ts b/apps/docs/content/components/button/group-disabled.ts
index 55b5281bc2..a0fb219d26 100644
--- a/apps/docs/content/components/button/group-disabled.ts
+++ b/apps/docs/content/components/button/group-disabled.ts
@@ -1,14 +1,4 @@
-const App = `import {Button, ButtonGroup} from "@nextui-org/react";
-
-export default function App() {
- return (
-
-
-
-
-
- );
-}`;
+import App from "./group-disabled.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/button/group-use-case.raw.jsx b/apps/docs/content/components/button/group-use-case.raw.jsx
new file mode 100644
index 0000000000..b880294fec
--- /dev/null
+++ b/apps/docs/content/components/button/group-use-case.raw.jsx
@@ -0,0 +1,69 @@
+import {
+ Button,
+ ButtonGroup,
+ Dropdown,
+ DropdownTrigger,
+ DropdownMenu,
+ DropdownItem,
+} from "@nextui-org/react";
+
+export const ChevronDownIcon = () => (
+
+);
+
+export default function App() {
+ const [selectedOption, setSelectedOption] = React.useState(new Set(["merge"]));
+
+ const descriptionsMap = {
+ merge:
+ "All commits from the source branch are added to the destination branch via a merge commit.",
+ squash:
+ "All commits from the source branch are added to the destination branch as a single commit.",
+ rebase: "All commits from the source branch are added to the destination branch individually.",
+ };
+
+ const labelsMap = {
+ merge: "Create a merge commit",
+ squash: "Squash and merge",
+ rebase: "Rebase and merge",
+ };
+
+ // Convert the Set to an Array and get the first value.
+ const selectedOptionValue = Array.from(selectedOption)[0];
+
+ return (
+
+
+
+
+
+
+
+
+ {labelsMap["merge"]}
+
+
+ {labelsMap["squash"]}
+
+
+ {labelsMap["rebase"]}
+
+
+
+
+ );
+}
diff --git a/apps/docs/content/components/button/group-use-case.ts b/apps/docs/content/components/button/group-use-case.ts
index d1220f5371..d563f87977 100644
--- a/apps/docs/content/components/button/group-use-case.ts
+++ b/apps/docs/content/components/button/group-use-case.ts
@@ -1,67 +1,7 @@
-const ChevronDownIcon = `export const ChevronDownIcon = () => (
-
-);`;
-
-const App = `import {Button, ButtonGroup, Dropdown, DropdownTrigger, DropdownMenu, DropdownItem} from "@nextui-org/react";
-import {ChevronDownIcon} from './ChevronDownIcon';
-
-export default function App() {
- const [selectedOption, setSelectedOption] = React.useState(new Set(["merge"]));
-
- const descriptionsMap = {
- merge:
- "All commits from the source branch are added to the destination branch via a merge commit.",
- squash:
- "All commits from the source branch are added to the destination branch as a single commit.",
- rebase: "All commits from the source branch are added to the destination branch individually.",
- };
-
- const labelsMap = {
- merge: "Create a merge commit",
- squash: "Squash and merge",
- rebase: "Rebase and merge",
- }
-
- // Convert the Set to an Array and get the first value.
- const selectedOptionValue = Array.from(selectedOption)[0];
-
- return (
-
-
-
-
-
-
-
-
- {labelsMap["merge"]}
-
-
- {labelsMap["squash"]}
-
-
- {labelsMap["rebase"]}
-
-
-
-
- );
-}`;
+import App from "./group-use-case.raw.jsx?raw";
const react = {
"/App.jsx": App,
- "/ChevronDownIcon.jsx": ChevronDownIcon,
};
export default {
diff --git a/apps/docs/content/components/button/group.raw.jsx b/apps/docs/content/components/button/group.raw.jsx
new file mode 100644
index 0000000000..4c3273f823
--- /dev/null
+++ b/apps/docs/content/components/button/group.raw.jsx
@@ -0,0 +1,11 @@
+import {Button, ButtonGroup} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+
+
+
+
+ );
+}
diff --git a/apps/docs/content/components/button/group.ts b/apps/docs/content/components/button/group.ts
index ec5d6678da..0660a894cd 100644
--- a/apps/docs/content/components/button/group.ts
+++ b/apps/docs/content/components/button/group.ts
@@ -1,14 +1,4 @@
-const App = `import {Button, ButtonGroup} from "@nextui-org/react";
-
-export default function App() {
- return (
-
-
-
-
-
- );
-}`;
+import App from "./group.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/button/icon-only.raw.jsx b/apps/docs/content/components/button/icon-only.raw.jsx
new file mode 100644
index 0000000000..ccb38b1424
--- /dev/null
+++ b/apps/docs/content/components/button/icon-only.raw.jsx
@@ -0,0 +1,55 @@
+import {Button} from "@nextui-org/react";
+
+export const HeartIcon = ({fill = "currentColor", filled, size, height, width, ...props}) => {
+ return (
+
+ );
+};
+
+export const CameraIcon = ({fill = "currentColor", size, height, width, ...props}) => {
+ return (
+
+ );
+};
+
+export default function App() {
+ return (
+
+
+
+
+ );
+}
diff --git a/apps/docs/content/components/button/icon-only.ts b/apps/docs/content/components/button/icon-only.ts
index b438e283f2..7709cd3f67 100644
--- a/apps/docs/content/components/button/icon-only.ts
+++ b/apps/docs/content/components/button/icon-only.ts
@@ -1,82 +1,7 @@
-const HeartIcon = `export const HeartIcon = ({
- fill = 'currentColor',
- filled,
- size,
- height,
- width,
- label,
- ...props
-}) => {
- return (
-
- );
-};
-`;
-
-const CameraIcon = `export const CameraIcon = ({
- fill = 'currentColor',
- filled,
- size,
- height,
- width,
- label,
- ...props
-}) => {
- return (
-
- );
-};`;
-
-const App = `import {Button} from "@nextui-org/react";
-import {HeartIcon} from './HeartIcon';
-import {CameraIcon} from './CameraIcon';
-
-export default function App() {
- return (
-
-
-
-
- );
-}`;
+import App from "./icon-only.raw.jsx?raw";
const react = {
"/App.jsx": App,
- "/HeartIcon.jsx": HeartIcon,
- "/CameraIcon.jsx": CameraIcon,
};
export default {
diff --git a/apps/docs/content/components/button/icons.raw.jsx b/apps/docs/content/components/button/icons.raw.jsx
new file mode 100644
index 0000000000..2e1634bba0
--- /dev/null
+++ b/apps/docs/content/components/button/icons.raw.jsx
@@ -0,0 +1,62 @@
+import {Button} from "@nextui-org/react";
+
+export const UserIcon = ({fill = "currentColor", size, height, width, ...props}) => {
+ return (
+
+ );
+};
+
+export const CameraIcon = ({fill = "currentColor", size, height, width, ...props}) => {
+ return (
+
+ );
+};
+
+export default function App() {
+ return (
+
+ }>
+ Take a photo
+
+ } variant="bordered">
+ Delete user
+
+
+ );
+}
diff --git a/apps/docs/content/components/button/icons.ts b/apps/docs/content/components/button/icons.ts
index 783ae43bd1..22a410c88f 100644
--- a/apps/docs/content/components/button/icons.ts
+++ b/apps/docs/content/components/button/icons.ts
@@ -1,91 +1,7 @@
-const UserIcon = `export const UserIcon = ({
- fill = 'currentColor',
- filled,
- size,
- height,
- width,
- label,
- ...props
-}) => {
- return (
-
- );
-};`;
-
-const CameraIcon = `export const CameraIcon = ({
- fill = 'currentColor',
- filled,
- size,
- height,
- width,
- label,
- ...props
-}) => {
- return (
-
- );
-};`;
-
-const App = `import {Button} from "@nextui-org/react";
-import {UserIcon} from './UserIcon';
-import {CameraIcon} from './CameraIcon';
-
-export default function App() {
- return (
-
-
-
-
- );
-}`;
+import App from "./icons.raw.jsx?raw";
const react = {
"/App.jsx": App,
- "/UserIcon.jsx": UserIcon,
- "/CameraIcon.jsx": CameraIcon,
};
export default {
diff --git a/apps/docs/content/components/button/loading-custom.raw.jsx b/apps/docs/content/components/button/loading-custom.raw.jsx
new file mode 100644
index 0000000000..50979e32b5
--- /dev/null
+++ b/apps/docs/content/components/button/loading-custom.raw.jsx
@@ -0,0 +1,34 @@
+import {Button} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/button/loading-custom.ts b/apps/docs/content/components/button/loading-custom.ts
index 7dbe0d78f5..b0036de8da 100644
--- a/apps/docs/content/components/button/loading-custom.ts
+++ b/apps/docs/content/components/button/loading-custom.ts
@@ -1,37 +1,4 @@
-const App = `import {Button} from "@nextui-org/react";
-
-export default function App() {
- return (
-
- );
-}`;
+import App from "./loading-custom.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/button/loading.raw.jsx b/apps/docs/content/components/button/loading.raw.jsx
new file mode 100644
index 0000000000..6b75c489d4
--- /dev/null
+++ b/apps/docs/content/components/button/loading.raw.jsx
@@ -0,0 +1,9 @@
+import {Button} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+ );
+}
diff --git a/apps/docs/content/components/button/loading.ts b/apps/docs/content/components/button/loading.ts
index 830d52eea4..0c8fea5a5f 100644
--- a/apps/docs/content/components/button/loading.ts
+++ b/apps/docs/content/components/button/loading.ts
@@ -1,12 +1,4 @@
-const App = `import {Button} from "@nextui-org/react";
-
-export default function App() {
- return (
-
- );
-}`;
+import App from "./loading.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/button/radius.raw.jsx b/apps/docs/content/components/button/radius.raw.jsx
new file mode 100644
index 0000000000..c91268e560
--- /dev/null
+++ b/apps/docs/content/components/button/radius.raw.jsx
@@ -0,0 +1,13 @@
+import {Button} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/docs/content/components/button/radius.ts b/apps/docs/content/components/button/radius.ts
index 739ca0f5b8..7b78db1ce0 100644
--- a/apps/docs/content/components/button/radius.ts
+++ b/apps/docs/content/components/button/radius.ts
@@ -1,26 +1,4 @@
-const App = `import {Button} from "@nextui-org/react";
-
-export default function App() {
- return (
-
-
-
-
-
-
-
- );
-}`;
+import App from "./radius.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/button/sizes.raw.jsx b/apps/docs/content/components/button/sizes.raw.jsx
new file mode 100644
index 0000000000..4880e203fd
--- /dev/null
+++ b/apps/docs/content/components/button/sizes.raw.jsx
@@ -0,0 +1,11 @@
+import {Button} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+
+
+
+
+ );
+}
diff --git a/apps/docs/content/components/button/sizes.ts b/apps/docs/content/components/button/sizes.ts
index 06b90c1ffd..85a2f5b30b 100644
--- a/apps/docs/content/components/button/sizes.ts
+++ b/apps/docs/content/components/button/sizes.ts
@@ -1,20 +1,4 @@
-const App = `import {Button} from "@nextui-org/react";
-
-export default function App() {
- return (
-
-
-
-
-
- );
-}`;
+import App from "./sizes.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/button/usage.raw.jsx b/apps/docs/content/components/button/usage.raw.jsx
new file mode 100644
index 0000000000..fcb138b916
--- /dev/null
+++ b/apps/docs/content/components/button/usage.raw.jsx
@@ -0,0 +1,5 @@
+import {Button} from "@nextui-org/react";
+
+export default function App() {
+ return ;
+}
diff --git a/apps/docs/content/components/button/usage.ts b/apps/docs/content/components/button/usage.ts
index f80f3914ca..1118304c37 100644
--- a/apps/docs/content/components/button/usage.ts
+++ b/apps/docs/content/components/button/usage.ts
@@ -1,12 +1,4 @@
-const App = `import {Button} from "@nextui-org/react";
-
-export default function App() {
- return (
-
- );
-}`;
+import App from "./usage.raw.jsx?raw";
const react = {
"/App.jsx": App,
diff --git a/apps/docs/content/components/button/variants.raw.jsx b/apps/docs/content/components/button/variants.raw.jsx
new file mode 100644
index 0000000000..7a7eaff52d
--- /dev/null
+++ b/apps/docs/content/components/button/variants.raw.jsx
@@ -0,0 +1,29 @@
+import {Button} from "@nextui-org/react";
+
+export default function App() {
+ return (
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/docs/content/components/button/variants.ts b/apps/docs/content/components/button/variants.ts
index fe6067aed7..ddea95fb2e 100644
--- a/apps/docs/content/components/button/variants.ts
+++ b/apps/docs/content/components/button/variants.ts
@@ -1,32 +1,4 @@
-const App = `import {Button} from "@nextui-org/react";
-
-export default function App() {
- return (
-
-
-
-
-
-
-
-
-
- );
-}`;
+import App from "./variants.raw.jsx?raw";
const react = {
"/App.jsx": App,