Skip to content

Commit

Permalink
feat: add custom props to BottomNav
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokada committed May 26, 2023
1 parent b4c2366 commit 018c6cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/bottom-nav/BottomNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
export let outerDefault: string = 'w-full z-50 border-gray-200 dark:bg-gray-700 dark:border-gray-600';
export let innerDefault: string = 'grid h-full max-w-lg mx-auto';
export let outerCustom: string = '';
export let innerCustom: string = '';
setContext('navType', navType);
Expand All @@ -27,7 +29,7 @@
card: 'bottom-0 left-0 h-16 bg-white border-t',
meeting: 'bottom-0 left-0 grid h-16 grid-cols-1 px-8 bg-white border-t md:grid-cols-3',
video: 'bottom-0 left-0 grid h-24 grid-cols-1 px-8 bg-white border-t md:grid-cols-3',
custom: ''
custom: outerCustom
};
const innerDivClasses = {
Expand All @@ -39,7 +41,7 @@
card: '',
meeting: 'flex items-center justify-center mx-auto',
video: 'flex items-center w-full',
custom: ''
custom: innerCustom
};
$: outerClass = classNames(position, outerDefault, outerDivClasses[navType], $$props.outerDiv);
Expand Down

0 comments on commit 018c6cd

Please sign in to comment.