import {Refractor} from '@modal-sh/react-refractor'; import {NextPage} from 'next'; import * as React from 'react'; import {getFormValues} from '@theoryofnekomata/formxtra'; const BlogPostPage: NextPage = () => { const handleAction: React.FormEventHandler = React.useCallback((e) => { e.preventDefault(); const { currentTarget, nativeEvent } = e; const { submitter } = nativeEvent as unknown as { submitter: HTMLButtonElement }; const { action } = getFormValues(currentTarget, { submitter }); switch (action) { case 'copyContents': console.log('copy contents'); break; default: break; } }, []); return ( <>

Using Refractor on your Next website

Use @modal-sh/react-refractor as follows on your page:

} code={`import {Refractor} from '@modal-sh/react-refractor'; import {NextPage} from 'next'; const BlogPostPage: NextPage = () => { return (
); }; export default BlogPostPage; `} />

Easy as that!

) }; export default BlogPostPage;