@emotion/styled

  • Version 11.8.1
  • Published
  • 207 kB
  • 5 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

      <AdditionalProps extends {} = {}>(
      ...styles: Array<
      Interpolation<
      ComponentProps &
      SpecificComponentProps &
      AdditionalProps & { theme: Theme }
      >
      >
      ): StyledComponent<
      ComponentProps & AdditionalProps,
      SpecificComponentProps,
      JSXProps
      >;

      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
        >;

        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> {}

            property label

            label?: string;

              property target

              target?: string;

                method shouldForwardProp

                shouldForwardProp: (propName: PropertyKey) => boolean;

                  Type Aliases

                  type StyledTags

                  type StyledTags = {
                  [Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent<
                  {
                  theme?: Theme;
                  as?: React.ElementType;
                  },
                  JSX.IntrinsicElements[Tag]
                  >;
                  };

                    Namespaces

                    namespace @emotion/styled/macro

                    module '@emotion/styled/macro' {}

                      Package Files (3)

                      Dependencies (5)

                      Dev Dependencies (4)

                      Peer Dependencies (3)

                      Badge

                      To add a badge like this onejsDocs.io badgeto 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>