Skip to content

Commit

Permalink
feat(config): add loading indicator toggle
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <[email protected]>
  • Loading branch information
ZTL-UwU committed Aug 11, 2024
1 parent 1a4a8f0 commit c850104
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<NuxtLoadingIndicator :color="false" class="z-100 bg-primary80" />
<NuxtLoadingIndicator :color="false" class="z-100 bg-primary/80" />
<ConfigProvider :use-id="useIdFunction">
<LayoutHeader />

Expand Down
1 change: 1 addition & 0 deletions composables/useConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const defaultConfig: DefaultConfig = {
radius: 0.5,
},
header: {
showLoadingIndicator: true,
title: 'shadcn-docs',
showTitle: true,
logo: {
Expand Down
5 changes: 5 additions & 0 deletions content/2.api/1.configuration/1.shadcn-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ interface INav {
## `header`

::field-group
::field{name="showLoadingIndicator" type="boolean" defaultValue="true"}
Whether to show the nuxt loading indicator.
::
::field{name="title" type="string"}
The title shown on the header next to the icon.
::
Expand Down Expand Up @@ -200,6 +203,7 @@ const defaultConfig: DefaultConfig = {
radius: 0.5,
},
header: {
showLoadingIndicator: true,
title: 'shadcn-docs',
showTitle: true,
logo: {
Expand All @@ -221,6 +225,7 @@ const defaultConfig: DefaultConfig = {
showTitle: true,
codeCopyToast: true,
codeCopyToastText: 'Copied to clipboard!',
fieldRequiredText: 'required',
padded: true,
codeIcon: {
'package.json': 'vscode-icons:file-type-node',
Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface DefaultConfig {
radius: number;
};
header: {
showLoadingIndicator: boolean;
title: string;
showTitle: boolean;
border: boolean;
Expand Down

0 comments on commit c850104

Please sign in to comment.