mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 09:31:17 -08:00
feat: Scrollable, non-overflowing tables
This commit is contained in:
2 files changed
+16
-4
No files matched your search
@@ -762,9 +762,11 @@ export const getReactCustomHtmlParser = (
|
||||
|
||||
if (name === 'table') {
|
||||
return (
|
||||
<table {...props} className={css.Table}>
|
||||
{renderChildren()}
|
||||
</table>
|
||||
<div className={css.TableContainer}>
|
||||
<table {...props} className={css.Table}>
|
||||
{renderChildren()}
|
||||
</table>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
if (name === 'th') {
|
||||
|
||||
@@ -302,9 +302,17 @@ export const HorizontalRule = style([
|
||||
},
|
||||
]);
|
||||
|
||||
export const Table = style([
|
||||
export const TableContainer = style([
|
||||
DefaultReset,
|
||||
MarginSpaced,
|
||||
{
|
||||
overflowX: 'auto',
|
||||
maxWidth: '100%',
|
||||
}
|
||||
])
|
||||
|
||||
export const Table = style([
|
||||
DefaultReset,
|
||||
{
|
||||
borderCollapse: 'collapse',
|
||||
},
|
||||
@@ -317,6 +325,7 @@ export const Th = style([
|
||||
border: `${config.borderWidth.B300} solid ${color.SurfaceVariant.ContainerLine}`,
|
||||
backgroundColor: color.SurfaceVariant.Container,
|
||||
color: color.SurfaceVariant.OnContainer,
|
||||
minWidth: toRem(100),
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -327,5 +336,6 @@ export const Td = style([
|
||||
border: `${config.borderWidth.B300} solid ${color.Surface.ContainerLine}`,
|
||||
backgroundColor: color.Surface.Container,
|
||||
color: color.Surface.OnContainer,
|
||||
minWidth: toRem(100),
|
||||
}
|
||||
]);
|
||||
Reference in new issue
Block a user