@yatoday/astro-ui 0.17.13 → 0.17.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,6 +16,7 @@ const {
|
|
|
16
16
|
isSticky = false,
|
|
17
17
|
isDark = false,
|
|
18
18
|
showToggleTheme = false,
|
|
19
|
+
initialMode = 'system',
|
|
19
20
|
position = 'center',
|
|
20
21
|
classes = {},
|
|
21
22
|
scrollOffset = 60,
|
|
@@ -139,7 +140,7 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`;
|
|
|
139
140
|
>
|
|
140
141
|
<div class="items-center flex justify-between w-full md:w-auto">
|
|
141
142
|
<div class="flex">
|
|
142
|
-
{showToggleTheme && <DarkMode iconClass={cn('w-6 h-6 md:w-5 md:h-5 md:inline-block', darkModeIconClass)} />}
|
|
143
|
+
{showToggleTheme && <DarkMode initialMode={initialMode} iconClass={cn('w-6 h-6 md:w-5 md:h-5 md:inline-block', darkModeIconClass)} />}
|
|
143
144
|
</div>
|
|
144
145
|
|
|
145
146
|
<!-- Actions Buttons -->
|
|
@@ -8,6 +8,7 @@ export type WidgetNavbarProps = {
|
|
|
8
8
|
isSticky?: boolean;
|
|
9
9
|
isDark?: boolean;
|
|
10
10
|
showToggleTheme?: boolean;
|
|
11
|
+
initialMode?: 'light' | 'dark' | 'system' | 'light:only' | 'dark:only';
|
|
11
12
|
position?: 'center' | 'left' | 'right';
|
|
12
13
|
classes?: Record<string, string>;
|
|
13
14
|
scrollOffset?: number;
|