Skip to content

Commit

Permalink
💄 style: Add new card style
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Sep 23, 2024
1 parent 896b821 commit 38778e6
Show file tree
Hide file tree
Showing 22 changed files with 248 additions and 24 deletions.
8 changes: 4 additions & 4 deletions .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ const themeConfig = {
name: 'UI',
nav: [
{ link: '/components/action-icon', title: 'Components' },
{ link: '/brand/lobehub', title: 'Brand' },
{ link: '/mdx/callout', title: 'Mdx' },
{ link: 'https://icons.lobehub.com', mode: 'override', title: 'Icons' },
{ link: 'https://charts.lobehub.com', mode: 'override', title: 'Charts' },
{ link: '/colors', title: 'Colors' },
{ link: 'http://icons.lobehub.com', mode: 'override', title: 'Icons' },
{ link: 'https://ant.design/components/overview', mode: 'override', title: 'Antd Components' },
{ link: 'https://lucide.dev/icons', mode: 'override', title: 'Lucide Icons' },
{ link: 'https://ant-design.github.io/antd-style', mode: 'override', title: 'CSSinJS' },
{ link: '/changelog', title: 'Changelog' },
],
socialLinks: {
Expand All @@ -54,6 +53,7 @@ const themeConfig = {

export default defineConfig({
alias: {
'@lobehub/ui/brand': resolve(__dirname, './src/brand'),
'@lobehub/ui/mdx': resolve(__dirname, './src/mdx'),
},
apiParser: isProduction ? {} : false,
Expand Down
17 changes: 17 additions & 0 deletions docs/brand/Lobechat-text.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
nav: Brand
group: Components
title: LobeChatText
apiHeader:
pkg: '@lobehub/ui/brand'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/brand/lobechat-text.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/brand/components/LobeChatText.tsx'
---

## Example

```tsx
import { LobeChatText } from '@lobehub/ui/brand';

export default () => <LobeChatText size={64} />;
```
28 changes: 28 additions & 0 deletions docs/brand/lobechat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
nav: Brand
group: Combine
title: LobeChat
apiHeader:
pkg: '@lobehub/ui/brand'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/brand/lobechat.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/brand/LobeChat.tsx'
---

## Example

```tsx
import { LobeChat } from '@lobehub/ui/brand';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16} align={'flex-start'}>
<LobeChat size={64} />
<LobeChat size={64} type={'mono'} />
<LobeChat size={64} type={'flat'} />
<LobeChat size={64} type={'text'} />
<LobeChat size={64} type={'combine'} />
<LobeChat size={64} extra={'Discover'} />
<LobeChat size={64} type={'combine'} extra={'Discover'} />
</Flexbox>
);
```
17 changes: 17 additions & 0 deletions docs/brand/lobehub-text.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
nav: Brand
group: Components
title: LobeHubText
apiHeader:
pkg: '@lobehub/ui/brand'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/brand/lobehub-text.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/brand/components/LobeHubText.tsx'
---

## Example

```tsx
import { LobeHubText } from '@lobehub/ui/brand';

export default () => <LobeHubText size={64} />;
```
28 changes: 28 additions & 0 deletions docs/brand/lobehub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
nav: Brand
group: Combine
title: LobeHub
apiHeader:
pkg: '@lobehub/ui/brand'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/brand/lobehub.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/brand/LobeHub.tsx'
---

## Example

```tsx
import { LobeHub } from '@lobehub/ui/brand';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16} align={'flex-start'}>
<LobeHub size={64} />
<LobeHub size={64} type={'mono'} />
<LobeHub size={64} type={'flat'} />
<LobeHub size={64} type={'text'} />
<LobeHub size={64} type={'combine'} />
<LobeHub size={64} extra={'Discover'} />
<LobeHub size={64} type={'combine'} extra={'Discover'} />
</Flexbox>
);
```
17 changes: 17 additions & 0 deletions docs/brand/logo-3d.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
nav: Brand
group: Components
title: Logo3d
apiHeader:
pkg: '@lobehub/ui/brand'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/brand/logo-3d.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/brand/components/Logo3d.tsx'
---

## Example

```tsx
import { Logo3d } from '@lobehub/ui/brand';

export default () => <Logo3d size={64} />;
```
17 changes: 17 additions & 0 deletions docs/brand/logo-flat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
nav: Brand
group: Components
title: LogoFlat
apiHeader:
pkg: '@lobehub/ui/brand'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/brand/logo-flat.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/brand/components/LogoFlat.tsx'
---

## Example

```tsx
import { LogoFlat } from '@lobehub/ui/brand';

export default () => <LogoFlat size={64} />;
```
17 changes: 17 additions & 0 deletions docs/brand/logo-mono.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
nav: Brand
group: Components
title: LogoMono
apiHeader:
pkg: '@lobehub/ui/brand'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/brand/logo-mono.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/brand/components/LogoMono.tsx'
---

## Example

```tsx
import { LogoMono } from '@lobehub/ui/brand';

export default () => <LogoMono size={64} />;
```
6 changes: 3 additions & 3 deletions docs/mdx/Callout/index.md → docs/mdx/callout.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ group: Built-ins
title: Callout
apiHeader:
pkg: '@lobehub/ui/mdx'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/Callout/index.md'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/callout.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/mdx/Callout/index.tsx'
---

## Example

<code src="./demos/index.tsx" ></code>
<code src="./demos/callout.tsx" ></code>

## Usage

<code src="./demos/story.tsx" nopadding></code>
<code src="./demos/callout-story.tsx" nopadding></code>
8 changes: 6 additions & 2 deletions docs/mdx/Cards/index.md → docs/mdx/cards.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ group: Built-ins
title: Cards
apiHeader:
pkg: '@lobehub/ui/mdx'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/Cards/index.md'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/cards.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/mdx/Cards/index.tsx'
---

## Example

<code src="./demos/index.tsx" ></code>
<code src="./demos/cards.tsx" ></code>

## Rows

<code src="./demos/cards-rows.tsx" ></code>
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions docs/mdx/demos/cards-rows.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Typography } from '@lobehub/ui';
import { Card, Cards } from '@lobehub/ui/mdx';
import { Divider } from 'antd';

export default () => (
<Typography>
<Cards maxItemWidth={100} rows={4}>
<Card href="/mdx/callout" title="Callout" />
<Card href="/mdx/callout" title="Tabs" />
<Card href="/mdx/callouts" title="Steps" />
<Card href="/mdx/callouts" title="FileTree" />
</Cards>
<Divider />
<Cards maxItemWidth={200} rows={3}>
<Card href="/mdx/callout" title="Callout" />
<Card href="/mdx/callout" title="Tabs" />
<Card href="/mdx/callouts" title="Steps" />
<Card href="/mdx/callouts" title="FileTree" />
</Cards>
<Divider />
<Cards rows={2}>
<Card href="/mdx/callout" title="Callout" />
<Card href="/mdx/callout" title="Tabs" />
<Card href="/mdx/callouts" title="Steps" />
<Card href="/mdx/callouts" title="FileTree" />
</Cards>
<Divider />
<Cards rows={1}>
<Card href="/mdx/callout" title="Callout" />
<Card href="/mdx/callout" title="Tabs" />
<Card href="/mdx/callouts" title="Steps" />
<Card href="/mdx/callouts" title="FileTree" />
</Cards>
</Typography>
);
21 changes: 21 additions & 0 deletions docs/mdx/Cards/demos/index.tsx → docs/mdx/demos/cards.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
import { Typography } from '@lobehub/ui';
import { Card, Cards } from '@lobehub/ui/mdx';
import { Divider } from 'antd';
import { Warehouse } from 'lucide-react';

export default () => (
<Typography>
<Cards>
<Card href="/mdx/callout" title="Callout" />
<Card href="/mdx/callout" title="Tabs" />
<Card href="/mdx/callouts" title="Steps" />
</Cards>
<Divider orientation={'left'}>Icon & Title</Divider>
<Cards>
<Card href="/mdx/callout" icon={Warehouse} title="Callout" />
<Card href="/mdx/callout" icon={Warehouse} title="Tabs" />
<Card href="/mdx/callouts" icon={Warehouse} title="Steps" />
</Cards>
<Divider orientation={'left'}>Icon & Desc & Title</Divider>
<Cards>
<Card desc="Demo desction text" href="/mdx/callout" icon={Warehouse} title="Callout" />
<Card desc="Demo desction text" href="/mdx/callout" icon={Warehouse} title="Tabs" />
<Card desc="Demo desction text" href="/mdx/callouts" icon={Warehouse} title="Steps" />
</Cards>
<Divider orientation={'left'}>Tags</Divider>
<Cards>
<Card
desc="Demo desction text"
href="/mdx/callout"
tag={'Components'}
tagColor={'cyan'}
title="Callout"
/>
<Card desc="Demo desction text" href="/mdx/callout" tag={'Components'} title="Tabs" />
<Card desc="Demo desction text" href="/mdx/callouts" tag={'Components'} title="Steps" />
</Cards>
<Divider orientation={'left'}>Image Cover</Divider>
<Cards>
<Card
href="/mdx/callout"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/mdx/FileTree/index.md → docs/mdx/file-tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ group: Built-ins
title: FileTree
apiHeader:
pkg: '@lobehub/ui/mdx'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/FileTree/index.md'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/file-tree.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/mdx/FileTree/index.tsx'
---

## Example

<code src="./demos/index.tsx" ></code>
<code src="./demos/file-tree.tsx" ></code>
2 changes: 1 addition & 1 deletion docs/mdx/index.md → docs/mdx/mdx-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: mdxComponents
atomId: mdxComponents
apiHeader:
pkg: '@lobehub/ui/mdx'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/index.md'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/mdx-components.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/mdx/mdxComponents.ts'
---

Expand Down
4 changes: 2 additions & 2 deletions docs/mdx/Steps/index.md → docs/mdx/steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ group: Built-ins
title: Steps
apiHeader:
pkg: '@lobehub/ui/mdx'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/Steps/index.md'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/steps.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/mdx/Steps/index.tsx'
---

## Example

<code src="./demos/index.tsx" ></code>
<code src="./demos/steps.tsx" ></code>
4 changes: 2 additions & 2 deletions docs/mdx/Tabs/index.md → docs/mdx/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ title: Tabs
atomId: 'Tabs, Tab'
apiHeader:
pkg: '@lobehub/ui/mdx'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/Tabs/index.md'
docUrl: 'https://github.com/lobehub/lobe-ui/tree/master/docs/mdx/tabs.md'
sourceUrl: 'https://github.com/lobehub/lobe-ui/tree/master/src/mdx/Tabs/index.tsx'
---

## Example

<code src="./demos/index.tsx" ></code>
<code src="./demos/tabs.tsx" ></code>
Loading

0 comments on commit 38778e6

Please sign in to comment.