“componentes componentes de texto datilografados” Respostas de código

componentes componentes de texto datilografados

# to prevent typescript error, install this
yarn add @types/styled-components

# NPM
npm install @types/styled-components
Salo Hopeless

Componente componente de estilo

//in styled component with param define type of param
const StyledComponent = styled.div`
        background: black;
        color: white;
    `;

    const StyledComponentWithParams = styled.div<{ color?: string }>`
        background: yellow;
        color: ${(color) => (color ? "yellow" : "white")};
    `;

    const StyledComponentDefaultValueParams = styled.div<{ color?: string }>`
        background: yellow;
        color: ${(color = "white") => (color)};
    `;
Shirshak kandel

Respostas semelhantes a “componentes componentes de texto datilografados”

Perguntas semelhantes a “componentes componentes de texto datilografados”

Procure respostas de código populares por idioma

Procurar outros idiomas de código