refactor: unify theme (#1303)

This commit is contained in:
Himself65
2023-03-04 01:36:20 -06:00
committed by GitHub
parent fe0d78b2d6
commit 4e9f0c97a1
43 changed files with 779 additions and 543 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
import { styled, textEllipsis } from '../../styles';
import { TableCellProps } from './interface';
export const StyledTable = styled.table<{ tableLayout: 'auto' | 'fixed' }>(
export const StyledTable = styled('table')<{ tableLayout: 'auto' | 'fixed' }>(
({ theme, tableLayout }) => {
return {
fontSize: theme.font.base,
@@ -14,13 +14,13 @@ export const StyledTable = styled.table<{ tableLayout: 'auto' | 'fixed' }>(
}
);
export const StyledTableBody = styled.tbody(() => {
export const StyledTableBody = styled('tbody')(() => {
return {
fontWeight: 400,
};
});
export const StyledTableCell = styled.td<
export const StyledTableCell = styled('td')<
Pick<TableCellProps, 'ellipsis' | 'align' | 'proportion'>
>(({ align = 'left', ellipsis = false, proportion }) => {
const width = proportion ? `${proportion * 100}%` : 'auto';
@@ -37,7 +37,7 @@ export const StyledTableCell = styled.td<
};
});
export const StyledTableHead = styled.thead(() => {
export const StyledTableHead = styled('thead')(() => {
return {
fontWeight: 500,
tr: {
@@ -50,7 +50,7 @@ export const StyledTableHead = styled.thead(() => {
};
});
export const StyledTableRow = styled.tr(({ theme }) => {
export const StyledTableRow = styled('tr')(({ theme }) => {
return {
td: {
transition: 'background .15s',