@emotion/styled
- Version 11.13.0
- Published
- 264 kB
- 6 dependencies
- MIT license
Install
npm i @emotion/styled
yarn add @emotion/styled
pnpm add @emotion/styled
Overview
styled API for emotion
Index
Variables
variable styled
const styled: CreateStyled;
Interfaces
interface CreateStyled
interface CreateStyled extends BaseCreateStyled, StyledTags {}
interface CreateStyledComponent
interface CreateStyledComponent< ComponentProps extends {}, SpecificComponentProps extends {} = {}, JSXProps extends {} = {}> {}
call signature
( template: TemplateStringsArray, ...styles: Array< Interpolation<ComponentProps & SpecificComponentProps & { theme: Theme }> >): StyledComponent<ComponentProps, SpecificComponentProps, JSXProps>;
call signature
<AdditionalProps extends {}>( template: TemplateStringsArray, ...styles: Array< Interpolation< ComponentProps & SpecificComponentProps & AdditionalProps & { theme: Theme } > >): StyledComponent< ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
call signature
<AdditionalProps extends {} = {}>( ...styles: Array< Interpolation< ComponentProps & SpecificComponentProps & AdditionalProps & { theme: Theme } > >): StyledComponent< ComponentProps & AdditionalProps, SpecificComponentProps, JSXProps>;
interface FilteringStyledOptions
interface FilteringStyledOptions< Props = Record<string, any>, ForwardedProps extends keyof Props & string = keyof Props & string> {}
Same as StyledOptions but shouldForwardProp must be a type guard
property label
label?: string;
property shouldForwardProp
shouldForwardProp?: (propName: string) => propName is ForwardedProps;
property target
target?: string;
interface StyledComponent
interface StyledComponent< ComponentProps extends {}, SpecificComponentProps extends {} = {}, JSXProps extends {} = {}> extends React.FC<ComponentProps & SpecificComponentProps & JSXProps>, ComponentSelector {}
method withComponent
withComponent: { <C extends React.ComponentClass<React.ComponentProps<C>>>( component: C ): StyledComponent< ComponentProps & PropsOf<C>, {}, { ref?: React.Ref<InstanceType<C>> } >; <C extends React.ComponentType<React.ComponentProps<C>>>( component: C ): StyledComponent<any, {}, {}>; <Tag extends string | number | symbol>(tag: Tag): StyledComponent< ComponentProps, JSX.IntrinsicElements, {} >;};
interface StyledOptions
interface StyledOptions<Props = Record<string, any>> {}
property label
label?: string;
property shouldForwardProp
shouldForwardProp?: (propName: string) => boolean;
property target
target?: string;
Type Aliases
type StyledTags
type StyledTags = { [Tag in keyof ReactJSXIntrinsicElements]: CreateStyledComponent< { theme?: Theme; as?: React.ElementType; }, ReactJSXIntrinsicElements[Tag] >;};
Package Files (2)
Dependencies (6)
Dev Dependencies (4)
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@emotion/styled
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@emotion/styled)
- HTML<a href="https://www.jsdocs.io/package/@emotion/styled"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2489 ms. - Missing or incorrect documentation? Open an issue for this package.