2022-06-05 20:56:42 +02:00
|
|
|
import { ComponentType, ReactElement } from 'react';
|
2020-07-04 18:13:41 +02:00
|
|
|
// eslint-disable-next-line no-restricted-imports
|
2022-06-05 20:56:42 +02:00
|
|
|
import styledImport, { css as cssImport, CSSProp, StyledComponentProps } from 'styled-components';
|
2020-07-04 18:13:41 +02:00
|
|
|
|
|
|
|
declare module 'react' {
|
|
|
|
interface Attributes {
|
|
|
|
css?: CSSProp;
|
|
|
|
}
|
|
|
|
}
|
2022-06-05 20:56:42 +02:00
|
|
|
|
|
|
|
declare module 'styled-components' {
|
|
|
|
interface StyledComponentBase<
|
|
|
|
C extends string | ComponentType<any>,
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
|
|
T extends object,
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
|
|
O extends object = {},
|
2022-11-25 21:25:03 +01:00
|
|
|
A extends keyof any = never,
|
2022-06-26 21:13:52 +02:00
|
|
|
> extends ForwardRefExoticBase<StyledComponentProps<C, T, O, A>> {
|
|
|
|
(
|
2022-11-25 21:25:03 +01:00
|
|
|
props: StyledComponentProps<C, T, O, A> & { as?: Element | string; forwardedAs?: never | undefined },
|
2022-06-26 21:13:52 +02:00
|
|
|
): ReactElement<StyledComponentProps<C, T, O, A>>;
|
2022-06-05 20:56:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
declare module 'twin.macro' {
|
|
|
|
const css: typeof cssImport;
|
|
|
|
const styled: typeof styledImport;
|
|
|
|
}
|