You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.9 KiB
46 lines
1.9 KiB
import React, { useState } from 'react';
|
|
import { Switch, Typography } from 'antd';
|
|
|
|
const { Paragraph, Text } = Typography;
|
|
|
|
const App: React.FC = () => {
|
|
const [ellipsis, setEllipsis] = useState(true);
|
|
|
|
return (
|
|
<>
|
|
<Switch
|
|
checked={ellipsis}
|
|
onChange={() => {
|
|
setEllipsis(!ellipsis);
|
|
}}
|
|
/>
|
|
|
|
<Paragraph ellipsis={ellipsis}>
|
|
Ant Design, a design language for background applications, is refined by Ant UED Team. Ant
|
|
Design, a design language for background applications, is refined by Ant UED Team. Ant
|
|
Design, a design language for background applications, is refined by Ant UED Team. Ant
|
|
Design, a design language for background applications, is refined by Ant UED Team. Ant
|
|
Design, a design language for background applications, is refined by Ant UED Team. Ant
|
|
Design, a design language for background applications, is refined by Ant UED Team.
|
|
</Paragraph>
|
|
|
|
<Paragraph ellipsis={ellipsis ? { rows: 2, expandable: true, symbol: 'more' } : false}>
|
|
Ant Design, a design language for background applications, is refined by Ant UED Team. Ant
|
|
Design, a design language for background applications, is refined by Ant UED Team. Ant
|
|
Design, a design language for background applications, is refined by Ant UED Team. Ant
|
|
Design, a design language for background applications, is refined by Ant UED Team. Ant
|
|
Design, a design language for background applications, is refined by Ant UED Team. Ant
|
|
Design, a design language for background applications, is refined by Ant UED Team.
|
|
</Paragraph>
|
|
|
|
<Text
|
|
style={ellipsis ? { width: 100 } : undefined}
|
|
ellipsis={ellipsis ? { tooltip: 'I am ellipsis now!' } : false}
|
|
>
|
|
Ant Design, a design language for background applications, is refined by Ant UED Team.
|
|
</Text>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default App;
|
|
|