@c-rex/components 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +24 -4
- package/src/autocomplete.tsx +1 -1
- package/src/breadcrumb.tsx +84 -26
- package/src/check-article-lang.tsx +2 -2
- package/src/dialog-filter.tsx +5 -4
- package/src/flag.tsx +15 -0
- package/src/info/info-card.tsx +43 -0
- package/src/info/info-table.tsx +127 -0
- package/src/info/shared.tsx +32 -0
- package/src/{sidebar.tsx → left-sidebar.tsx} +3 -43
- package/src/navbar/language-switcher/content-language-switch.tsx +26 -3
- package/src/navbar/language-switcher/shared.tsx +14 -14
- package/src/navbar/navbar.tsx +6 -7
- package/src/navbar/search-input.tsx +10 -5
- package/src/navbar/settings.tsx +1 -1
- package/src/navbar/sign-in-out-btns.tsx +1 -16
- package/src/page-wrapper.tsx +3 -2
- package/src/pagination.tsx +10 -3
- package/src/result-list.tsx +17 -9
- package/src/result-view/blog.tsx +83 -10
- package/src/result-view/table.tsx +84 -64
- package/src/right-sidebar.tsx +52 -0
- package/src/blog-card.tsx +0 -88
- package/src/stories/blog-card.stories.tsx +0 -46
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { BlogCard } from '../blog-card';
|
|
3
|
-
|
|
4
|
-
const meta: Meta = {
|
|
5
|
-
title: 'Components/BlogCard',
|
|
6
|
-
component: BlogCard,
|
|
7
|
-
tags: ['autodocs',],
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: 'centered',
|
|
10
|
-
},
|
|
11
|
-
argTypes: {
|
|
12
|
-
data: { control: 'object', description: 'The data to be displayed in the card' },
|
|
13
|
-
priority: { control: 'boolean', description: 'Whether the image should be prioritized', type: 'boolean' },
|
|
14
|
-
horizontal: { control: 'boolean' },
|
|
15
|
-
},
|
|
16
|
-
} satisfies Meta<typeof BlogCard>;
|
|
17
|
-
|
|
18
|
-
export default meta;
|
|
19
|
-
type Story = StoryObj<typeof meta>;
|
|
20
|
-
|
|
21
|
-
const mockBlogData = {
|
|
22
|
-
title: 'Getting Started with C-Rex Components',
|
|
23
|
-
blurDataURL: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==',
|
|
24
|
-
image: 'https://images.pexels.com/photos/31712301/pexels-photo-31712301/free-photo-of-scenic-cycling-tour-in-andernach-fields.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',
|
|
25
|
-
description: 'Learn how to use C-Rex components to build modern web applications with React and Next.js.',
|
|
26
|
-
authors: 'John Doe',
|
|
27
|
-
_id: '1',
|
|
28
|
-
date: '2023-05-15',
|
|
29
|
-
slug: 'getting-started-with-c-rex-components',
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const Horizontal: Story = {
|
|
33
|
-
args: {
|
|
34
|
-
data: mockBlogData,
|
|
35
|
-
priority: false,
|
|
36
|
-
horizontal: true,
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const WithPriority: Story = {
|
|
41
|
-
args: {
|
|
42
|
-
data: mockBlogData,
|
|
43
|
-
priority: true,
|
|
44
|
-
horizontal: false,
|
|
45
|
-
},
|
|
46
|
-
};
|