Skip to content

Commit

Permalink
docs: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gioboa committed Oct 18, 2023
1 parent 4fe6fe9 commit 5ef436d
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 207 deletions.
20 changes: 6 additions & 14 deletions apps/docs/components/content/AppSidebarBottom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,44 @@ import { NavItem } from '@nuxt/content/dist/runtime/types';
import { blocks } from '~/utils/blocks';
import { components } from '~/utils/components';
type Framework = {
name: 'vue' | 'react' | 'qwik';
icon: string;
};
const framework = useCookie<Framework>('framework');
const links = computed<NavItem[]>(() => {
return [
{
title: 'Components',
_path: '/components',
children: [
{
title: 'All Components',
_path: '/components',
_id: 'all-components',
sidebarNesting: 'inline',
},
...(components.qwik?.map((component: string) => ({
...components.map((component: string) => ({
title: component.replace('Sf', ''),
_path: `/qwik/components/${component
.replace('Sf', '')
.toLowerCase()}`,
_id: component,
sidebarNesting: 'inline',
})) ?? []),
})),
],
},
{
title: 'Blocks',
_path: '/blocks',
children: [
{
title: 'All Blocks',
_path: '/blocks',
_id: 'all-blocks',
sidebarNesting: 'inline',
},
...(blocks.qwik?.map((block: string) => ({
...blocks.map((block: string) => ({
title: block.replace('Sf', ''),
_path: `/qwik/blocks/${block.toLowerCase()}`,
_id: block,
sidebarNesting: 'inline',
})) ?? []),
})),
],
},
// {
Expand All @@ -61,12 +53,12 @@ const links = computed<NavItem[]>(() => {
// _id: 'all-hooks',
// sidebarNesting: 'inline',
// },
// ...(hooks.qwik.map((hook: string) => ({
// ...hooks.map((hook: string) => ({
// title: hook,
// _path: `/qwik/hooks/${hook.toLowerCase()}`,
// _id: hook,
// sidebarNesting: 'inline',
// })) ?? []),
// })),
// ],
// },
];
Expand Down
1 change: 0 additions & 1 deletion apps/docs/components/content/AppSidebarTop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const selectedFramework = useCookie('framework', {
});
const route = useRoute();
const router = useRouter();
watch(
() => route,
Expand Down
106 changes: 26 additions & 80 deletions apps/docs/utils/blocks.ts
Original file line number Diff line number Diff line change
@@ -1,80 +1,26 @@
export const blocks = {
vue: [
'Alert',
'Banners',
'Breadcrumbs',
'Card',
'Checkout',
'Combobox',
'Filters',
'Footer',
'FormFields',
'Gallery',
'MegaMenu',
'NavbarBottom',
'NavbarTop',
'NewsletterBox',
'OrderSummary',
'Pagination',
'ProductCard',
'ProductSlider',
'QuantitySelector',
'RatingForms',
'Review',
'Search',
'SelectDropdown',
'Tabs',
],
react: [
'Alert',
'Banners',
'Breadcrumbs',
'Card',
'Checkout',
'Combobox',
'Filters',
'Footer',
'FormFields',
'Gallery',
'MegaMenu',
'NavbarBottom',
'NavbarTop',
'NewsletterBox',
'OrderSummary',
'Pagination',
'ProductCard',
'ProductSlider',
'QuantitySelector',
'RatingForms',
'Review',
'Search',
'SelectDropdown',
'Tabs',
],
qwik: [
'Alert',
'Banners',
'Breadcrumbs',
'Card',
'Checkout',
'Combobox',
'Filters',
'Footer',
'FormFields',
'Gallery',
'MegaMenu',
'NavbarBottom',
'NavbarTop',
'NewsletterBox',
'OrderSummary',
'Pagination',
'ProductCard',
'ProductSlider',
'QuantitySelector',
'RatingForms',
'Review',
'Search',
'SelectDropdown',
'Tabs',
],
};
export const blocks = [
'Alert',
'Banners',
'Breadcrumbs',
'Card',
// 'Checkout',
// 'Combobox',
// 'Filters',
'Footer',
// 'FormFields',
// 'Gallery',
// 'MegaMenu',
'NavbarBottom',
'NavbarTop',
'NewsletterBox',
'OrderSummary',
// 'Pagination',
// 'ProductCard',
// 'ProductSlider',
// 'QuantitySelector',
// 'RatingForms',
// 'Review',
// 'Search',
// 'SelectDropdown',
// 'Tabs',
];
108 changes: 28 additions & 80 deletions apps/docs/utils/components.ts
Original file line number Diff line number Diff line change
@@ -1,80 +1,28 @@
export const components = {
vue: [
'SfAccordionItem',
'SfBadge',
'SfButton',
'SfCheckbox',
'SfChip',
'SfCounter',
'SfDrawer',
'SfDropdown',
'SfIconBase',
'SfInput',
'SfLink',
'SfListItem',
'SfLoaderCircular',
'SfLoaderLinear',
'SfModal',
'SfProgressCircular',
'SfProgressLinear',
'SfRadio',
'SfRating',
'SfRatingButton',
'SfScrollable',
'SfSelect',
'SfSwitch',
'SfTextarea',
'SfThumbnail',
'SfTooltip',
],
react: [
'SfAccordionItem',
'SfBadge',
'SfButton',
'SfCheckbox',
'SfChip',
'SfCounter',
'SfDrawer',
'SfDropdown',
'SfIconBase',
'SfInput',
'SfLink',
'SfListItem',
'SfLoaderCircular',
'SfLoaderLinear',
'SfModal',
'SfProgressCircular',
'SfProgressLinear',
'SfRadio',
'SfRating',
'SfRatingButton',
'SfScrollable',
'SfSelect',
'SfSwitch',
'SfTextarea',
'SfThumbnail',
'SfTooltip',
],
qwik: [
'SfAccordionItem',
'SfBadge',
'SfButton',
'SfCheckbox',
'SfChip',
'SfCounter',
'SfDrawer',
'SfDropdown',
'SfIconBase',
'SfInput',
'SfLink',
'SfListItem',
'SfLoaderCircular',
'SfLoaderLinear',
'SfModal',
'SfProgressCircular',
'SfProgressLinear',
'SfRadio',
'SfRating',
'SfSwitch',
],
};
export const components = [
'SfAccordionItem',
'SfBadge',
'SfButton',
'SfCheckbox',
'SfChip',
'SfCounter',
'SfDrawer',
'SfDropdown',
'SfIconBase',
'SfInput',
'SfLink',
'SfListItem',
'SfLoaderCircular',
'SfLoaderLinear',
'SfModal',
'SfProgressCircular',
'SfProgressLinear',
'SfRadio',
'SfRating',
// 'SfRatingButton',
// 'SfScrollable',
// 'SfSelect',
'SfSwitch',
// 'SfTextarea',
// 'SfThumbnail',
// 'SfTooltip',
];
42 changes: 10 additions & 32 deletions apps/docs/utils/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,10 @@
export const hooks = {
vue: [
'useDisclosure',
'useDropdown',
'useFocusVisible',
'usePagination',
'usePopover',
'useScrollable',
'useTooltip',
'useTrapFocus',
],
react: [
'useDisclosure',
'useDropdown',
'useFocusVisible',
'usePagination',
'usePopover',
'useScrollable',
'useTooltip',
'useTrapFocus',
],
qwik: [
'useDisclosure',
'useDropdown',
'useFocusVisible',
'usePagination',
'usePopover',
'useScrollable',
'useTooltip',
'useTrapFocus',
],
};
export const hooks = [
// 'useDisclosure',
// 'useDropdown',
// 'useFocusVisible',
// 'usePagination',
// 'usePopover',
// 'useScrollable',
// 'useTooltip',
// 'useTrapFocus',
];

0 comments on commit 5ef436d

Please sign in to comment.