mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-14 08:36:22 +08:00
style: restrict type import (#1589)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Children, HTMLAttributes, PropsWithChildren, ReactNode } from 'react';
|
||||
import type { HTMLAttributes, PropsWithChildren, ReactNode } from 'react';
|
||||
import { Children } from 'react';
|
||||
|
||||
import { StyledTable } from './styles';
|
||||
const childrenHasEllipsis = (children: ReactNode | ReactNode[]): boolean => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HTMLAttributes, PropsWithChildren } from 'react';
|
||||
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
||||
|
||||
import { StyledTableBody } from './styles';
|
||||
export const TableBody = ({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TableCellProps } from './interface';
|
||||
import type { TableCellProps } from './interface';
|
||||
import { StyledTableCell } from './styles';
|
||||
export const TableCell = ({ children, ...props }: TableCellProps) => {
|
||||
return <StyledTableCell {...props}>{children}</StyledTableCell>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HTMLAttributes, PropsWithChildren } from 'react';
|
||||
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
||||
|
||||
import { StyledTableHead } from './styles';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { HTMLAttributes, PropsWithChildren } from 'react';
|
||||
import type { HTMLAttributes, PropsWithChildren } from 'react';
|
||||
|
||||
import { StyledTableRow } from './styles';
|
||||
export const TableRow = ({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { CSSProperties, HTMLAttributes, PropsWithChildren } from 'react';
|
||||
import type { CSSProperties, HTMLAttributes, PropsWithChildren } from 'react';
|
||||
|
||||
export type TableCellProps = {
|
||||
align?: 'left' | 'right' | 'center';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { styled, textEllipsis } from '../../styles';
|
||||
import { TableCellProps } from './interface';
|
||||
import type { TableCellProps } from './interface';
|
||||
|
||||
export const StyledTable = styled('table')<{ tableLayout: 'auto' | 'fixed' }>(
|
||||
({ theme, tableLayout }) => {
|
||||
|
||||
Reference in New Issue
Block a user