Files
react-test/docs/data/joy/components/table/TableTextEllipsis.js
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

59 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Avatar from '@mui/joy/Avatar';
import Box from '@mui/joy/Box';
import Table from '@mui/joy/Table';
import Typography from '@mui/joy/Typography';
import Link from '@mui/joy/Link';
export default function TableTextEllipsis() {
return (
<Table
aria-label="table with ellipsis texts"
noWrap
sx={{ mx: 'auto', width: 400 }}
>
<thead>
<tr>
<th>Name</th>
<th style={{ width: '60%' }}>
Description (you should see a part of this message)
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1.5 }}>
<Avatar src="/static/images/avatar/1.jpg" />
<Box sx={{ minWidth: 0 }}>
<Typography noWrap sx={{ fontWeight: 'lg' }}>
Morty D Ardiousdellois Addami
</Typography>
<Typography noWrap level="body-sm">
Writer, Youtuber
</Typography>
</Box>
</Box>
</td>
<td>
Cras non velit nec nisi vulputate nonummy. Maecenas tincidunt lacus at
velit. Vivamus vel nulla eget eros elementum pellentesque. Quisque porta
volutpat erat. Quisque erat eros, viverra eget, congue eget, semper
rutrum, nulla.
</td>
</tr>
<tr>
<td>Joseph Morriso</td>
<td>
<Typography noWrap>
<Link href="#text-ellipsis" startDecorator="">
In eleifend quam a odio
</Link>
. Suspendisse potenti in hac habitasse platea dictumst.
</Typography>
</td>
</tr>
</tbody>
</Table>
);
}