{tops.map((pos, index) => (
Hi ByteDancer, this is a tooltip.
We have 2 lines.
}
position={Array.isArray(pos) ? pos[0] : pos}
key={index}
>
{Array.isArray(pos) ? pos[1] : pos}
))}
{lefts.map((pos, index) => (
Hi ByteDancer, this is a tooltip.
We have 2 lines.
}
position={Array.isArray(pos) ? pos[0] : pos}
key={index}
>
{Array.isArray(pos) ? pos[1] : pos}
))}
{rights.map((pos, index) => (
Hi ByteDancer, this is a tooltip.
We have 2 lines.
}
position={Array.isArray(pos) ? pos[0] : pos}
key={index}
>
{Array.isArray(pos) ? pos[1] : pos}
))}
{bottoms.map((pos, index) => (
Hi ByteDancer, this is a tooltip.
We have 2 lines.
}
position={Array.isArray(pos) ? pos[0] : pos}
key={index}
>
{Array.isArray(pos) ? pos[1] : pos}
))}
>
)
}
export const TransitionDemo = () => {
const [key, setKey] = useState(1);
return (
<>
>
)
}
export const AdjustPosIfNeedTBLR = () => {
const content =
Hi ByteDancer, this is a tooltip.
We have 2 lines.
const contentHigh =
Hi ByteDancer, this is a tooltip.
We have 2 lines.
We have 2 lines.
return (
top to bottomLefttop to bottomRighttop to topLefttop to topRightbottom to bottomLeftbottom to bottomRightbottom to topLeftbottom to topRightleft to leftTopleft to leftBottomleft to rightTopleft to rightBottomright to rightTopright to rightBottomright to leftTopright to leftBottomright to leftBottom
}
// right -> other
export const AutoRight2LeftDemo = () => ;
AutoRight2LeftDemo.storyName = `✅ auto : right -> left`;
export const AutoRight2LeftBottomDemo = () => ;
AutoRight2LeftBottomDemo.storyName = `✅ auto : right -> leftBottom`;
export const AutoRight2LeftTopDemo = () => ;
AutoRight2LeftTopDemo.storyName = `✅ auto : riht -> leftTop`;
export const AutoRight2RightBottomDemo = () => ;
AutoRight2RightBottomDemo.storyName = `✅ auto : right -> rightBottom`;
export const AutoRight2RightTopDemo = () => ;
AutoRight2RightTopDemo.storyName = `✅ auto : riht -> rightTop`;
// left -> other
export const Left2RightDemo = () => ;
Left2RightDemo.storyName = `✅ auto : left -> right`;
export const Left2LeftBottomDemo = () => ;
Left2LeftBottomDemo.storyName = `✅ auto : left -> leftBottom`;
export const Left2LeftTopDemo = () => ;
Left2LeftTopDemo.storyName = `✅ auto : left -> leftTop`;
export const Left2RightBottomDemo = () => ;
Left2RightBottomDemo.storyName = `✅ auto : left -> rightBottom`;
export const Left2RightTopDemo = () => ;
Left2RightTopDemo.storyName = `✅ auto : left -> rightTop`;
// top -> other
export const Top2BottomDemo = () => ;
Top2BottomDemo.storyName = `✅ auto : top -> bottom`;
export const Top2BottomLeftDemo = () => ;
Top2BottomLeftDemo.storyName = `✅ auto : top -> bottomLeft`;
export const Top2BottomRightDemo = () => ;
Top2BottomRightDemo.storyName = `✅ auto : top -> bottomRight`;
export const Top2TopLeftDemo = () => ;
Top2TopLeftDemo.storyName = `✅ auto : top -> topLeft`;
export const Top2TopRightDemo = () => ;
Top2TopRightDemo.storyName = `✅ auto : top -> topRight`;
// bottom -> other
export const Bottom2TopDemo = () => ;
Bottom2TopDemo.storyName = `✅ auto : bottom -> top`;
export const Bottom2TopLeftDemo = () => ;
Bottom2TopLeftDemo.storyName = `✅ auto : bottom -> topLeft`;
export const Bottom2TopRightDemo = () => ;
Bottom2TopRightDemo.storyName = `✅ auto : bottom -> topRight`;
export const Bottom2BottomLeftDemo = () => ;
Bottom2BottomLeftDemo.storyName = `✅ auto : bottom -> bottomLeft`;
export const Bottom2BottomRightDemo = () => ;
Bottom2BottomRightDemo.storyName = `✅ auto : bottom -> bottomRight`;
export const Fix1557 = () =>{
return (
>
}
>
}
>
Hover Me
);
}
export const wordBreak = () => {
const gapElement = (gap=200) => ;
const tooltipShowProps = {
trigger: "custom",
visible: true ,
// showArrow: false
};
const testContent = {
'长hash': 'ide2d3a4e9d7b7d93fc4c3b8e4b1b4b08e4f5a9f13ed8b8d6f7c5b7c4c7e4b9e6b9e6e5d4e4c5f6e3b1e7b3a3e3e5c5f4e9c8',
'url测试': 'https://semi.design/zh-CN/show/tooltip#%E4%BB%85%E5%BD%93%E5%86%85%E5%AE%B9%E5%AE%BD%E5%BA%A6%E8%B6%85%E5%87%BA%E6%97%B6%E5%B1%95%E7%A4%BA%20Tooltip',
'中文测试': '中文测试中文测试中文测试中文测试中文测试中文测试中文测试中文测试中文测试中文测试中文测试中文测试',
// 以下为英文中最长的单词
'英文测试': 'pneumonoultramicroscopicsilicovolcanoconiosis',
'日语测试': '超音波検査による胸部エコー検査結果、心拍数や脈波などの検査結果から、緊急性はないものの肺炎の可能性があるため、抗生物質の処方箋を出します。',
'韩语测试': '인공지능과 빅데이터 기술을 활용한 자율주행 자동차의 개발은 현재 국내외에서 많은 관심을 받고 있습니다.',
'泰语测试': 'เทคโนโลยีการผลิตอาหารและสารสกัดจากพืชชนิดต่าง ๆ กำลังเป็นที่สนใจในวงการอาหารทั่วโลก',
'阿拉伯语测试': 'تطور التكنولوجيا والذكاء الاصطناعي يؤثر بشكل كبير على صناعة العمليات الإنتاجية ونمط الحياة الحديثة.',
'越南语': 'Ứng dụng công nghệ thông tin và trí tuệ nhân tạo đang ngày càng được sử dụng rộng rãi trong lĩnh vực sản xuất và dịch vụ. không-gian-phi-trụ-điện-từ',
'俄罗斯语': 'Разработка новейших технологий искусственного интеллекта и машинного обучения становится все более важной в наши дни.',
'印尼语': 'Pemanfaatan teknologi informasi dan kecerdasan buatan semakin penting dalam industri modern.',
'马来语': 'Penggunaan teknologi maklumat dan kecerdasan buatan semakin penting dalam industri moden.',
'泰语': 'บริการจัดส่งสินค้าทางไปรษณีย์ภายในประเทศไทยมีความสะดวกสบายและรวดเร็วมากยิ่งขึ้นด้วยการใช้เทคโนโลยีที่ทันสมัยในการติดตามสถานะและการจัดส่งสินค้า นอกจากนี้ยังมีการให้บริการเพิ่มเติมอย่างต่างๆ เช่น การจัดส่งพิเศษ การรับส่งเอกสาร การจัดส่งด่วน เป็นต้น',
'土耳其语': "Otomobil endüstrisi, Türkiye'nin en önemli sanayi kollarından biridir. Türkiye, yılda yaklaşık 1 milyon adet otomobil üretimiyle Avrupa'nın önde gelen üreticileri arasındadır.",
'葡萄牙语': "A eletricidade é uma fonte de energia renovável e limpa, que é produzida a partir de fontes como a energia solar, eólica, hidroelétrica e geotérmica.",
'西班牙语': "La biotecnología es una rama de la ciencia que utiliza organismos vivos o partes de ellos para desarrollar productos y servicios que mejoren la calidad de vida.",
'意大利语': "L'ingegneria genetica è una branca della biologia molecolare che si occupa di manipolare il DNA per creare organismi con caratteristiche specifiche.",
'法语': 'La pharmacologie est la science qui étudie les effets des médicaments sur les êtres vivants et leur utilisation pour la prévention, le diagnostic et le traitement des maladies.',
'德语': 'Die Kernenergie ist eine umstrittene Energiequelle, die durch die Nutzung der Energie aus Atomkernen Strom erzeugt.',
'罗马尼亚语': 'Ingineria software este o ramură a informaticii care se ocupă cu dezvoltarea de programe și aplicații software.',
'瑞典语': 'Neurovetenskap är studiet av nervsystemet och dess funktioner, inklusive dess relationer till beteende och kognition.',
'波兰语': 'Archeologia jest nauką humanistyczną zajmującą się badaniem śladów pozostawionych przez człowieka w przeszłości.',
'荷兰语': 'Psychologie is de wetenschappelijke studie van het menselijk gedrag en de processen die daaraan ten grondslag liggen.',
};
const longWordContent = {
'英文测试': "pneumonoultramicroscopicsilicovolcanoconiosis",
'泰语测试': "หน้าต่างจอภาพ",
'阿拉伯语测试': "أفاستسقيناكموها",
'越南语': "bấtđồngxứngđáng",
'俄罗斯语': "человеконенавистничество",
'印尼语': "melipatgandakan",
'马来语': "pengangkutan",
'土耳其语': "çekoslovakyalılaştıramadıklarımızdanmışsınızcasına",
'葡萄牙语': "otorrinolaringologista",
'西班牙语': "electroencefalografista",
'意大利语': "precipitevolissimevolmente",
'法语': "anticonstitutionnellement ",
'德语': "Donaudampfschifffahrtsgesellschaftskapitän",
'罗马尼亚语': "neîncorporabile",
'瑞典语': "realisationsvinstbeskattning",
'波兰语': "najedźcieżżebrzącychświniątkach",
'荷兰语': "Kindercarnavalsoptochtvoorbereidingswerkzaamheden"
}
return (
<>
{['bottom','top'].map((item, index) => {
return
);
TooltipAllAddSpacing.story = {
name: 'tooltip All Add Spacing',
};
export const ViewportPrioritJudgment = () => {
// If the viewport reverse space is sufficient, the viewport result shall prevail
return (