Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122857552
ThemeProvider.d.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 22, 13:20
Size
1 KB
Mime Type
text/x-java
Expires
Thu, Jul 24, 13:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27536170
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
ThemeProvider.d.ts
View Options
import React from 'react';
/**
* Override DefaultTheme to get accurate typings for your project.
*
* ```
* // create styled-components.d.ts in your project source
* // if it isn't being picked up, check tsconfig compilerOptions.types
* import type { CSSProp } from "styled-components";
* import Theme from './theme';
*
* type ThemeType = typeof Theme;
*
* declare module "styled-components" {
* export interface DefaultTheme extends ThemeType {}
* }
*
* declare module "react" {
* interface DOMAttributes<T> {
* css?: CSSProp;
* }
* }
* ```
*/
export interface DefaultTheme {
[key: string]: any;
}
declare type ThemeFn = (outerTheme?: DefaultTheme) => DefaultTheme;
declare type ThemeArgument = DefaultTheme | ThemeFn;
declare type Props = {
children?: React.ReactChild;
theme: ThemeArgument;
};
export declare const ThemeContext: React.Context<DefaultTheme | undefined>;
export declare const ThemeConsumer: React.Consumer<DefaultTheme | undefined>;
/**
* Provide a theme to an entire react component tree via context
*/
export default function ThemeProvider(props: Props): JSX.Element | null;
export {};
Event Timeline
Log In to Comment