nextjs-themes
Version:
Unleash the Power of React Server Components! Use multiple themes on your site with confidence, without losing any advantages of React Server Components.
2 lines (1 loc) • 394 B
JavaScript
import{a as o}from"./chunk-DWU3FAMO.mjs";var t={s:"nth-s",system:"nth-system",dark:"nth-dark",a:"nth-a",light:"nth-light"};import{jsx as p}from"react/jsx-runtime";var g=({size:e=25,skipSystem:r,targetSelector:s,className:n,...i})=>{let{toggleColorScheme:l,colorSchemePref:m}=o(s);return p("button",{className:[t.s,t[m],n].join(" "),onClick:()=>l(r),style:{"--s":e+"px"},...i})};export{g as a};