Skip to content

Commit

Permalink
refactor(config)!: rename normal to default in for sidebar style
Browse files Browse the repository at this point in the history
  • Loading branch information
ZTL-UwU committed Oct 24, 2024
1 parent 62742a6 commit bc8f36f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default defineAppConfig({
aside: {
useLevel: true,
collapse: false,
folderStyle: 'normal',
folderStyle: 'default',
},
main: {
breadCrumb: true,
Expand Down
2 changes: 1 addition & 1 deletion components/layout/AsideTreeItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</span>

<SmartIcon
v-if="folderStyle === 'normal'"
v-if="folderStyle === 'default'"
name="lucide:chevron-down"
class="ml-auto transition-transform"
:class="[!isOpen && '-rotate-90']"
Expand Down
2 changes: 1 addition & 1 deletion composables/useConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const defaultConfig: DefaultConfig = {
aside: {
useLevel: true,
collapse: false,
folderStyle: 'normal',
folderStyle: 'default',
},
main: {
breadCrumb: true,
Expand Down
8 changes: 4 additions & 4 deletions content/1.getting-started/3.writing/3.folders.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ content/
::
::field{name="sidebar" type="object"}
::collapsible{title="Details" default-open}
::field{name="style" type="'normal' | 'tree' | 'group'" default-value="normal"}
::field{name="style" type="'default' | 'tree' | 'group'" default-value="default"}
The style used for the folder. The default value can be configured in the [appConfig](/api/configuration/shadcn-docs#aside).

| `normal` | `tree` | `group` |
| :-----------------------------------------------: | :-------------------------------------------: | :---------------------------------------------: |
| ![sidebar-normal](/sidebar-normal.png){width=400} | ![sidebar-tree](/sidebar-tree.png){width=400} | ![sidebar-group](/sidebar-group.png){width=400} |
| `default` | `tree` | `group` |
| :-------------------------------------------------: | :-------------------------------------------: | :---------------------------------------------: |
| ![sidebar-default](/sidebar-default.png){width=400} | ![sidebar-tree](/sidebar-tree.png){width=400} | ![sidebar-group](/sidebar-group.png){width=400} |
::
::
::
Expand Down
4 changes: 2 additions & 2 deletions content/3.api/1.configuration/1.shadcn-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ All configurable icons can be set to iconify icons, emojis and urls, using [smar
::field{name="collapse" type="boolean" defaultValue="false"}
Whether to collapse all collapsible by default.
::
::field{name="folderStyle" type="'normal' | 'tree' | 'group'" defaultValue="normal"}
::field{name="folderStyle" type="'default' | 'tree' | 'group'" defaultValue="default"}
The default style used for [folders](/getting-started/writing/folders#parameters).
::
::
Expand Down Expand Up @@ -232,7 +232,7 @@ const defaultConfig: DefaultConfig = {
aside: {
useLevel: true,
collapse: false,
folderStyle: 'normal',
folderStyle: 'default',
},
main: {
breadCrumb: true,
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface DefaultConfig {
aside: {
useLevel: boolean;
collapse: boolean;
folderStyle: 'normal' | 'tree' | 'group';
folderStyle: 'default' | 'tree' | 'group';
};
main: {
breadCrumb: boolean;
Expand Down

0 comments on commit bc8f36f

Please sign in to comment.