mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 15:16:28 +08:00
style: restrict type import (#1589)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Children, cloneElement, forwardRef } from 'react';
|
||||
|
||||
import { ButtonProps } from './interface';
|
||||
import type { ButtonProps } from './interface';
|
||||
import { Loading } from './Loading';
|
||||
import { StyledButton } from './styles';
|
||||
import { getSize } from './utils';
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import {
|
||||
Children,
|
||||
cloneElement,
|
||||
CSSProperties,
|
||||
forwardRef,
|
||||
HTMLAttributes,
|
||||
ReactElement,
|
||||
} from 'react';
|
||||
import type { CSSProperties, HTMLAttributes, ReactElement } from 'react';
|
||||
import { Children, cloneElement, forwardRef } from 'react';
|
||||
|
||||
import { StyledIconButton } from './styles';
|
||||
const SIZE_SMALL = 'small' as const;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { styled } from '../../styles';
|
||||
import { ButtonProps } from './interface';
|
||||
import type { ButtonProps } from './interface';
|
||||
import { getButtonColors } from './utils';
|
||||
export const LoadingContainer = styled('div')<Pick<ButtonProps, 'type'>>(
|
||||
({ theme, type = 'default' }) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Children, cloneElement, forwardRef } from 'react';
|
||||
|
||||
import { ButtonProps } from './interface';
|
||||
import type { ButtonProps } from './interface';
|
||||
import { StyledTextButton } from './styles';
|
||||
import { getSize } from './utils';
|
||||
export const TextButton = forwardRef<HTMLButtonElement, ButtonProps>(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
CSSProperties,
|
||||
HTMLAttributes,
|
||||
PropsWithChildren,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { CSSProperties } from 'react';
|
||||
import type { CSSProperties } from 'react';
|
||||
|
||||
import { absoluteCenter, displayInlineFlex, styled } from '../../styles';
|
||||
import { ButtonProps } from './interface';
|
||||
import type { ButtonProps } from './interface';
|
||||
import { getButtonColors, getSize } from './utils';
|
||||
|
||||
export const StyledIconButton = styled('button', {
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import { Theme } from '@mui/material';
|
||||
import type { Theme } from '@mui/material';
|
||||
|
||||
import {
|
||||
ButtonProps,
|
||||
SIZE_DEFAULT,
|
||||
SIZE_MIDDLE,
|
||||
SIZE_SMALL,
|
||||
} from './interface';
|
||||
import type { ButtonProps } from './interface';
|
||||
import { SIZE_DEFAULT, SIZE_MIDDLE, SIZE_SMALL } from './interface';
|
||||
|
||||
// TODO: Designer is not sure about the size, Now, is just use default size
|
||||
export const SIZE_CONFIG = {
|
||||
|
||||
Reference in New Issue
Block a user