@alt-digital/styleguide
v1.0.12
Published
Styleguide generator
Downloads
14
Readme
Example page integration
import { GetServerSideProps } from 'next'
import Styleguide, { Props } from '../styleguide/Styleguide'
import getClasses from '../styleguide/getClasses'
export const getServerSideProps: GetServerSideProps<Props> = async () => {
if (process.env.NODE_ENV === 'production') {
return {
notFound: true
}
}
return {
props: {
classes: await getClasses('/opt/app/src/styles/tailwind.css')
}
}
}
export default function StyleguidePage({ classes }: Props) {
return (
<Styleguide classes={classes} />
)
}