docs: add Edge badge for next release features

Resolves #277
This commit is contained in:
Benjamin Canac
2023-06-12 10:53:06 +02:00
parent f0b24ba25d
commit d20983d355
3 changed files with 13 additions and 5 deletions

View File

@@ -10,15 +10,21 @@
class="mt-1" class="mt-1"
:ui="{ :ui="{
wrapper: 'border-l border-gray-200 dark:border-gray-800 space-y-2', wrapper: 'border-l border-gray-200 dark:border-gray-800 space-y-2',
base: 'group block border-l -ml-px lg:leading-6', base: 'group block border-l -ml-px lg:leading-6 flex items-center gap-2',
padding: 'pl-4', padding: 'pl-4',
rounded: '', rounded: '',
font: '', font: '',
ring: '', ring: '',
active: 'text-primary-500 dark:text-primary-400 border-current font-semibold', active: 'text-primary-500 dark:text-primary-400 border-current',
inactive: 'border-transparent hover:border-gray-400 dark:hover:border-gray-500 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300' inactive: 'border-transparent hover:border-gray-400 dark:hover:border-gray-500 text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-300'
}" }"
/> >
<template #badge="{ link }">
<UBadge v-if="link.badge" size="xs" :ui="{ rounded: 'rounded-full' }">
{{ link.badge }}
</UBadge>
</template>
</UVerticalNavigation>
</div> </div>
</div> </div>
</template> </template>
@@ -29,6 +35,6 @@ import type { NavItem } from '@nuxt/content/dist/runtime/types'
const { navigation } = useContent() as { navigation: NavItem[] } const { navigation } = useContent() as { navigation: NavItem[] }
function mapContentLinks (links: NavItem[]) { function mapContentLinks (links: NavItem[]) {
return links?.map(link => ({ label: link.title, icon: link.icon, to: link._path })) || [] return links?.map(link => ({ label: link.title, icon: link.icon, to: link._path, badge: link.badge })) || []
} }
</script> </script>

View File

@@ -517,7 +517,7 @@ const selected = ref([people[1]])
``` ```
:: ::
### `empty-state` ### `empty-state` :u-badge{label="Edge" class="ml-2 align-text-bottom"}
Use the `#empty-state` slot to customize the empty state. Use the `#empty-state` slot to customize the empty state.

View File

@@ -1,6 +1,8 @@
--- ---
github: true github: true
description: Add a pagination to handle pages. description: Add a pagination to handle pages.
navigation:
badge: 'Edge'
--- ---
## Usage ## Usage