fix(style): markdown viewer text-intent
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import useOverlayScroller from '@/hooks/use-overlay-scroller';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button, Modal, Typography } from 'antd';
|
||||
import React from 'react';
|
||||
import SimpleBar from 'simplebar-react';
|
||||
import 'simplebar-react/dist/simplebar.min.css';
|
||||
import promptList from '../config/prompt';
|
||||
import '../style/prompt-modal.less';
|
||||
@@ -15,6 +15,15 @@ type ViewModalProps = {
|
||||
const AddWorker: React.FC<ViewModalProps> = (props) => {
|
||||
const { open, onCancel } = props || {};
|
||||
const intl = useIntl();
|
||||
const { initialize } = useOverlayScroller();
|
||||
const scrollerRef = React.useRef<any>(null);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (scrollerRef.current) {
|
||||
initialize(scrollerRef.current);
|
||||
}
|
||||
}, [scrollerRef.current, initialize]);
|
||||
|
||||
const handleSelect = (item: {
|
||||
title: string;
|
||||
data: { role: string; content: string }[];
|
||||
@@ -45,7 +54,7 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
|
||||
}}
|
||||
footer={null}
|
||||
>
|
||||
<SimpleBar style={{ maxHeight: '550px' }}>
|
||||
<div ref={scrollerRef} style={{ maxHeight: '550px', overflow: 'auto' }}>
|
||||
<div className="prompt-wrapper">
|
||||
{promptList.map((item, index) => {
|
||||
return (
|
||||
@@ -83,7 +92,7 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</SimpleBar>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user