Skip to content

Commit 6d94534

Browse files
committed
feat: add component images to /components page
1 parent 1a3a602 commit 6d94534

77 files changed

Lines changed: 36 additions & 24 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/showcase/app/(app)/components/page.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import AllComponentPreviews from '@/shared/components/all-components-previews';
2+
import { ComponentPreviewType } from '@/shared/types/App.types';
23
import { allDocs } from 'contentlayer/generated';
34
import type { Metadata } from 'next';
45

@@ -16,23 +17,15 @@ const allComponents = [...styledComponents, ...tailwindComponents].reduce(
1617
description: doc.description,
1718
componentSlug: doc.componentSlug,
1819
styled: false,
19-
tailwind: false
20+
tailwind: false,
21+
cover: doc?.cover ?? undefined
2022
};
2123

2224
acc[name][type as 'styled' | 'tailwind'] = true;
2325

2426
return acc;
2527
},
26-
{} as Record<
27-
string,
28-
{
29-
title: string;
30-
description: string | undefined;
31-
componentSlug: string;
32-
styled: boolean;
33-
tailwind: boolean;
34-
}
35-
>
28+
{} as Record<string, ComponentPreviewType>
3629
);
3730

3831
const result = Object.values(allComponents);

apps/showcase/contentlayer.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export const Docs = defineDocumentType(() => ({
2323
pts: { type: 'list', of: { type: 'string' }, required: false },
2424
autoGenerated: { type: 'boolean', required: false },
2525
lastUpdated: { type: 'date', required: false },
26-
hideCopyPage: { type: 'boolean', required: false }
26+
hideCopyPage: { type: 'boolean', required: false },
27+
cover: { type: 'string', required: false }
2728
},
2829
computedFields: {
2930
slug: {

apps/showcase/docs/styled/components/compare/features.mdx

Lines changed: 1 addition & 0 deletions

apps/showcase/docs/styled/components/focustrap/features.mdx

Lines changed: 1 addition & 1 deletion

apps/showcase/next.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,15 @@ const nextConfig: NextConfig = {
3838
return config;
3939
},
4040
images: {
41-
domains: ['primefaces.org']
41+
domains: ['primefaces.org'],
42+
remotePatterns: [
43+
{
44+
protocol: 'https',
45+
hostname: 'fqjltiegiezfetthbags.supabase.co',
46+
pathname: '/storage/v1/object/public/common.images/**'
47+
}
48+
],
49+
qualities: [75, 85, 90, 95]
4250
},
4351
async redirects() {
4452
const componentDirs = globSync('docs/components/**');
-1.66 KB
Binary file not shown.
-1.56 KB
Binary file not shown.
-1.84 KB
Binary file not shown.
-1.36 KB
Binary file not shown.
-3.29 KB
Binary file not shown.

0 commit comments

Comments
 (0)