@noxlovette/material 0.2.0 → 0.2.1

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.
@@ -29,9 +29,8 @@ On mobile (< md) it automatically renders as a bottom navigation bar.
29
29
  anchor = 'viewport',
30
30
  railTop = 0,
31
31
  withNavbar = false,
32
- showMobileFab = true,
33
- showMobileFooter = false,
34
- class: className
32
+ class: className,
33
+ navbarProps
35
34
  }: RailProps = $props();
36
35
 
37
36
  const expanded = $derived(!collapsed);
@@ -101,11 +100,7 @@ On mobile (< md) it automatically renders as a bottom navigation bar.
101
100
 
102
101
  <!-- Mobile bottom navbar (md:hidden) -->
103
102
  {#if withNavbar}
104
- <Navbar
105
- fab={showMobileFab ? fab : undefined}
106
- trailing={showMobileFooter ? railFooter : undefined}
107
- ghost
108
- >
103
+ <Navbar {...navbarProps}>
109
104
  <RailNavContext mobile={true}>
110
105
  {@render children?.()}
111
106
  </RailNavContext>
@@ -1,6 +1,7 @@
1
1
  import type { IconProps } from '../../../utils/index.js';
2
2
  import type { Snippet } from 'svelte';
3
3
  import type { HTMLAttributes } from 'svelte/elements';
4
+ import type { NavBarProps } from '../navbar/types.js';
4
5
  import type { RailItemVariants, RailVariants } from './theme.js';
5
6
  /**
6
7
  * Props for the RailItem component.
@@ -43,10 +44,8 @@ export type RailProps = RailVariants & HTMLAttributes<HTMLDivElement> & {
43
44
  anchor?: RailVariants['anchor'];
44
45
  /** Top offset in px for viewport/parent anchor (e.g. height of a top bar). Default 0. */
45
46
  railTop?: number;
46
- /** Render a bottom navbar on mobile (< md). Default false — opt in, since consumers may render their own mobile nav. */
47
+ /** Render a bottom navbar on mobile. */
47
48
  withNavbar?: boolean;
48
- /** Show the fab slot above the mobile navbar. Default true. */
49
- showMobileFab?: boolean;
50
- /** Show the railFooter slot inside the mobile navbar. Default false. */
51
- showMobileFooter?: boolean;
49
+ /** Customise the navbar inside the rail */
50
+ navbarProps?: NavBarProps;
52
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noxlovette/material",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {