const MoonIcon = `export const MoonIcon = (props) => ( );`; const SunIcon = `export const SunIcon = (props) => ( );`; const App = `import {Switch, VisuallyHidden, useSwitch} from "@nextui-org/react"; import {MoonIcon} from "./MoonIcon"; import {SunIcon} from "./SunIcon"; const ThemeSwitch = (props) => { const { Component, slots, isSelected, getBaseProps, getInputProps, getWrapperProps } = useSwitch(props); return (
{isSelected ? : }

Lights: {isSelected ? "on" : "off"}

) } export default function App() { return }`; const AppTs = `import {Switch, useSwitch, VisuallyHidden, SwitchProps} from "@nextui-org/react"; import {MoonIcon} from "./MoonIcon"; import {SunIcon} from "./SunIcon"; const ThemeSwitch = (props: SwitchProps) => { const { Component, slots, isSelected, getBaseProps, getInputProps, getWrapperProps } = useSwitch(props); return (
{isSelected ? : }

Lights: {isSelected ? "on" : "off"}

) } export default function App() { return }`; const react = { "/App.jsx": App, "/MoonIcon.jsx": MoonIcon, "/SunIcon.jsx": SunIcon, }; const reactTs = { "/App.tsx": AppTs, "/MoonIcon.tsx": MoonIcon, "/SunIcon.tsx": SunIcon, }; export default { ...react, ...reactTs, };