-
-
Notifications
You must be signed in to change notification settings - Fork 166
/
index.tsx
69 lines (65 loc) · 2.2 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import { Highlighter, Snippet } from '@lobehub/ui';
import { Features, FeaturesProps } from '@lobehub/ui/awesome';
import { useTheme } from 'antd-style';
import { MoonStar, Palette, Zap } from 'lucide-react';
import { Center } from 'react-layout-kit';
const items: FeaturesProps['items'] = [
{
description:
'Provides a simple way to customize default themes, you can change the colors, fonts, breakpoints and everything you need.',
icon: Palette,
title: 'Themeable',
},
{
description:
'voids unnecessary styles props at runtime, making it more performant than other UI libraries.',
icon: Zap,
title: 'Fast',
},
{
description:
'Automatic dark mode recognition, NextUI automatically changes the theme when detects HTML theme prop changes.',
icon: MoonStar,
title: 'Light & Dark UI',
},
];
const example = `import { ThemeProvider, GradientButton } from '@lobehub/ui'
export default () => (
<ThemeProvider>
<GradientButton>Hello AIGC</GradientButton>
</ThemeProvider>
)`;
export default () => {
const theme = useTheme();
return (
<Center
gap={48}
style={{ maxWidth: 960, overflow: 'hidden', position: 'relative', width: '100%' }}
>
<Center>
<h2 style={{ fontSize: 20, textAlign: 'center' }}>Start building your AIGC app now</h2>
<Snippet language={'bash'}>{'$ bun add @lobehub/ui'}</Snippet>
<p style={{ color: theme.colorTextSecondary, textAlign: 'center' }}>
The Lobe UI components are developed based on{' '}
<a href={'https://ant.design/components/overview'} rel="noreferrer" target={'_blank'}>
Antd components
</a>
, fully compatible with Antd components, <br />
and it is recommended to use{' '}
<a href={'https://ant-design.github.io/antd-style'} rel="noreferrer" target={'_blank'}>
antd-style
</a>{' '}
as the default css-in-js styling solution.
</p>
</Center>
<Highlighter
language={'tsx'}
style={{ background: theme.colorFillTertiary, width: '100%' }}
type={'ghost'}
>
{example}
</Highlighter>
<Features items={items} />
</Center>
);
};