-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Use Ant Design X instead (#530)
- Loading branch information
Showing
23 changed files
with
5,618 additions
and
4,304 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* eslint-disable react/no-danger */ | ||
import { Markdown } from '@ant-design/pro-editor'; | ||
import React from 'react'; | ||
|
||
interface IProps { | ||
className?: string; | ||
content: string; | ||
} | ||
|
||
const MarkdownRender = (props: IProps) => ( | ||
<Markdown | ||
className="ant-pro-chat-list-item-message-content" | ||
style={{ overflowX: 'hidden', overflowY: 'auto' }} | ||
> | ||
{props.content} | ||
</Markdown> | ||
); | ||
export default MarkdownRender; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use client'; | ||
import { Spin } from 'antd'; | ||
import React from 'react'; | ||
|
||
export interface ISpinnerProps { | ||
loading?: boolean; | ||
spinner?: React.ReactNode; | ||
children?: React.ReactNode; | ||
} | ||
|
||
const MySpinner = (props: ISpinnerProps) => { | ||
const { loading } = props; | ||
if (loading) { | ||
return ( | ||
<div className="relative w-full h-full"> | ||
<div className="absolute top-0 left-0 w-full h-full pointer-events-none flex justify-center items-center bg-white bg-opacity-75"> | ||
{props.spinner ?? <Spin />} | ||
</div> | ||
{props.children} | ||
</div> | ||
); | ||
} | ||
return props.children; | ||
}; | ||
|
||
export default MySpinner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,37 @@ | ||
.chat_item_container{ | ||
.chat_item_container { | ||
position: relative; | ||
width: 100%; | ||
max-width: 100vw; | ||
padding: 16px; | ||
content-visibility: auto; | ||
contain-intrinsic-size: 100px; | ||
} | ||
width: 100%; | ||
max-width: 100vw; | ||
padding: 16px; | ||
content-visibility: auto; | ||
contain-intrinsic-size: 100px; | ||
} | ||
.petercat-avatar { | ||
flex: 0 0 40px; | ||
} | ||
.petercat-avatar .ant-avatar { | ||
width: 40px; | ||
height: 40px; | ||
border-radius: 50%; | ||
} | ||
.petercat-header { | ||
font-size: 12px !important; | ||
line-height: 1 !important; | ||
color: rgba(0, 0, 0, 0.45) !important; | ||
} | ||
|
||
.petercat-content-start { | ||
padding: 8px 16px 8px 16px !important; | ||
border-radius: 16px !important; | ||
background: rgba(241, 241, 241, 1) !important; | ||
} | ||
|
||
.petercat-content-end { | ||
padding: 8px 16px 8px 16px !important; | ||
border-radius: 16px !important; | ||
background: rgba(250, 228, 203, 1) !important; | ||
} | ||
|
||
.petercat-lui .ant-bubble-content { | ||
min-height: 0 !important; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.