Skip to content

Commit 89b234f

Browse files
committed
upgrade deps && docs
1 parent d4b9b3a commit 89b234f

30 files changed

+166
-166
lines changed

docs/functions/client_color_switch_color_switch.ColorSwitch.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ <h4>Source</h4><ul>
1010
</ul>
1111
<pre><code class="language-typescript"><span class="hl-3">export</span><span class="hl-1"> </span><span class="hl-6">function</span><span class="hl-1"> </span><span class="hl-0">ColorSwitch</span><span class="hl-1">({ </span><span class="hl-4">targetId</span><span class="hl-1">, </span><span class="hl-4">skipSystem</span><span class="hl-1">, </span><span class="hl-4">size</span><span class="hl-1">, ...</span><span class="hl-4">props</span><span class="hl-1"> }: </span><span class="hl-8">ColorSwitchProps</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-13">setColorSchemePreference</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">resolvedColorScheme</span><span class="hl-1">: </span><span class="hl-13">rcs</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">colorSchemePreference</span><span class="hl-1">: </span><span class="hl-13">csp</span><span class="hl-1">,</span><br/><span class="hl-1"> } = </span><span class="hl-0">useTheme</span><span class="hl-1">(</span><span class="hl-4">targetId</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-0">toggleColorScheme</span><span class="hl-1"> = () </span><span class="hl-6">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">switch</span><span class="hl-1"> (</span><span class="hl-4">csp</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">case</span><span class="hl-1"> </span><span class="hl-2">&quot;dark&quot;</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-0">setColorSchemePreference</span><span class="hl-1">(</span><span class="hl-2">&quot;light&quot;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">break</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">case</span><span class="hl-1"> </span><span class="hl-2">&quot;light&quot;</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-0">setColorSchemePreference</span><span class="hl-1">(</span><span class="hl-4">skipSystem</span><span class="hl-1"> ? </span><span class="hl-2">&quot;dark&quot;</span><span class="hl-1"> : </span><span class="hl-2">&quot;system&quot;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">break</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">case</span><span class="hl-1"> </span><span class="hl-2">&quot;system&quot;</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-3">default</span><span class="hl-1">:</span><br/><span class="hl-1"> </span><span class="hl-0">setColorSchemePreference</span><span class="hl-1">(</span><span class="hl-2">&quot;dark&quot;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">break</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> };</span><br/><span class="hl-1"> </span><span class="hl-3">return</span><span class="hl-1"> (</span><br/><span class="hl-1"> &lt;</span><span class="hl-4">button</span><br/><span class="hl-1"> </span><span class="hl-4">className</span><span class="hl-1">={</span><span class="hl-4">[</span><span class="hl-2">&quot;nthul--color-switch&quot;</span><span class="hl-4">, rcs, csp </span><span class="hl-1">===</span><span class="hl-4"> </span><span class="hl-2">&quot;system&quot;</span><span class="hl-4"> </span><span class="hl-1">?</span><span class="hl-4"> </span><span class="hl-2">&quot;system&quot;</span><span class="hl-4"> </span><span class="hl-1">:</span><span class="hl-4"> </span><span class="hl-2">&quot;&quot;</span><span class="hl-4">].join(&quot; &quot;)}</span><br/><span class="hl-4"> data-testid=&quot;color-switch&quot;</span><br/><span class="hl-4"> {...props}</span><br/><span class="hl-4"> onClick={toggleColorScheme}</span><br/><span class="hl-4"> </span><span class="hl-5">// @ts-expect-error -- setting custom attribute</span><br/><span class="hl-4"> style={{ &quot;--size&quot;:</span><span class="hl-1"> </span><span class="hl-2">`</span><span class="hl-6">${</span><span class="hl-4">size</span><span class="hl-6">}</span><span class="hl-2">px`</span><span class="hl-1"> }}</span><br/><span class="hl-1"> </span><span class="hl-4">type</span><span class="hl-1">=</span><span class="hl-2">&quot;button&quot;</span><br/><span class="hl-1"> /&gt;</span><br/><span class="hl-1"> );</span><br/><span class="hl-1">}</span>
1212
</code><button>Copy</button></pre>
13-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/react18-tools/nextjs-themes-ultra/blob/20d0cc6c6554e37721fd064b73dcf7469736d89b/lib/src/client/color-switch/color-switch.tsx#L30">client/color-switch/color-switch.tsx:30</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>React18 Loaders</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
13+
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/react18-tools/nextjs-themes-ultra/blob/d4b9b3a760fac6118c6c631651a5cbad2feb6f14/lib/src/client/color-switch/color-switch.tsx#L30">client/color-switch/color-switch.tsx:30</a></li></ul></aside></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>React18 Loaders</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>

0 commit comments

Comments
 (0)