const ChevronIcon = `export const ChevronIcon = (props) => (
);
`;
const ChevronIconTs = `import {SVGProps} from "react";
type IconSvgProps = SVGProps;
export const ChevronIcon = (props: IconSvgProps) => (
);
`;
const AppTs = `import {Pagination, PaginationItemType, PaginationItemRenderProps} from "@nextui-org/react";
import {ChevronIcon} from "./ChevronIcon";
export default function App() {
const renderItem = ({
ref,
value,
isActive,
onNext,
onPrevious,
setPage,
className,
}: PaginationItemRenderProps) => {
if (value === PaginationItemType.NEXT) {
return (
);
}
if (value === PaginationItemType.PREV) {
return (
);
}
if (value === PaginationItemType.DOTS) {
return ;
}
// cursor is the default item
return (
);
};
return (
);
}`;
const App = `import {Pagination, PaginationItemType} from "@nextui-org/react";
import {ChevronIcon} from "./ChevronIcon";
export default function App() {
const renderItem = ({
ref,
value,
isActive,
onNext,
onPrevious,
setPage,
className,
}) => {
if (value === PaginationItemType.NEXT) {
return (
);
}
if (value === PaginationItemType.PREV) {
return (
);
}
if (value === PaginationItemType.DOTS) {
return ;
}
// cursor is the default item
return (
);
};
return (
);
}`;
const react = {
"/App.jsx": App,
"/ChevronIcon.jsx": ChevronIcon,
};
const reactTs = {
"/App.tsx": AppTs,
"/ChevronIcon.tsx": ChevronIconTs,
};
export default {
...react,
...reactTs,
};