use-lato.tsx 393 B

1234567891011121314151617181920
  1. import { Lato } from 'next/font/google';
  2. import type { DefineStyle } from './types';
  3. const lato = Lato({
  4. weight: ['400', '700'],
  5. style: ['normal', 'italic'],
  6. subsets: ['latin'],
  7. display: 'swap',
  8. });
  9. export const useLatoFontFamily: DefineStyle = () => (
  10. <style jsx global>
  11. {`
  12. :root {
  13. --grw-font-family-lato: ${lato.style.fontFamily};
  14. }
  15. `}
  16. </style>
  17. );