style: overflow layer padding

This commit is contained in:
jialin
2025-04-15 11:08:01 +08:00
parent 13ded5595a
commit ced45bec65
8 changed files with 67 additions and 88 deletions
+17 -20
View File
@@ -1,7 +1,6 @@
import { useIntl } from '@umijs/max';
import React from 'react';
import styled from 'styled-components';
import OverlayScroller from '../overlay-scroller';
const UL = styled.ul`
list-style: none;
@@ -31,25 +30,23 @@ const TooltipList: React.FC<TooltipListProps> = (props) => {
const intl = useIntl();
const { list } = props;
return (
<OverlayScroller style={{ padding: 0 }}>
<UL>
{list.map((item, index: number) => {
return (
<li key={index}>
<span className="title">
{item.title?.locale
? intl.formatMessage({ id: item.title?.text || '' })
: item.title}
:
</span>
<span className="content">
{intl.formatMessage({ id: item.tips })}
</span>
</li>
);
})}
</UL>
</OverlayScroller>
<UL>
{list.map((item, index: number) => {
return (
<li key={index}>
<span className="title">
{item.title?.locale
? intl.formatMessage({ id: item.title?.text || '' })
: item.title}
:
</span>
<span className="content">
{intl.formatMessage({ id: item.tips })}
</span>
</li>
);
})}
</UL>
);
};