style: tag tooltip content width

This commit is contained in:
jialin
2025-07-09 16:03:07 +08:00
parent 642ac3ebc4
commit b167170aa9
6 changed files with 15 additions and 12 deletions
+3 -1
View File
@@ -29,6 +29,7 @@ type StatusTagProps = {
download?: {
percent: number;
};
maxTooltipWidth?: number;
extra?: React.ReactNode;
actions?: {
label: string;
@@ -44,6 +45,7 @@ const StatusTag: React.FC<StatusTagProps> = ({
download,
extra,
actions = [],
maxTooltipWidth = 250,
type = 'tag'
}) => {
const { text, status } = statusValue;
@@ -118,7 +120,7 @@ const StatusTag: React.FC<StatusTagProps> = ({
<div
style={{
width: 'max-content',
maxWidth: 250,
maxWidth: maxTooltipWidth,
whiteSpace: 'pre-wrap',
wordBreak: 'break-word'
}}