mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-14 00:26:51 +08:00
refactor: unify theme (#1303)
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user