10.2.2 • Published 3 months ago

styles-build v10.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

Styles build

Styles build es una npm que te ayudara a organizar mas tu css en tu proyecto de react

Intalaciones

npm i styles-build@latest
yarn add styles-build@latest
pnpm add styles-build@latest
bun add styles-build@latest

Ejemplos

Javascript

import React from "react";
import styled from "styles-build";

export default function App() {
  const StyledDiv = styled("h1")({
 animation: {
    duration: '4s',
    timingFunction: 'ease-in-out',
    delay: '1s',
    iterationCount: 'infinite',
    animationStyle: `@keyframes customAnimation {
      0% {
        transform: scale(1);
      }
      50% {
        transform: scale(1.2);
      }
      100% {
        transform: scale(1);
      }
    }`
  },
  styles: {
     color: red,
     fontSize: 100px,
  },
  });
  const StyledDiv2 = styled("h1")({
 animation: {
    duration: '4s',
    timingFunction: 'ease-in-out',
    delay: '1s',
    iterationCount: 'infinite',
    animationStyle: `@keyframes customAnimation {
      0% {
        transform: scale(1);
      }
      50% {
        transform: scale(1.2);
      }
      100% {
        transform: scale(1);
      }
    }`
  },
  styles: {
     color: red,
     fontSize: 100px,
  },
  });
  
  return (
<>
<StyledDiv>Hello World!</StyledDiv>
    <StyledDiv2>Hola mundo2</StyledDiv2>
</>
  );
}

Typescript

import React from "react";
import styled from "styles-build";

interface StyledDivProps {
  animation: string;
  styles: string;
  duration: string;
  timingFunction: string;
  delay: string;
  infinite: boolean;
  iterationCount: number;
  animationStyle: string;
}

const App: React.FC = () => {
  const StyledDiv = styled("h1")<StyledDivProps>({
 animation: {
    duration: '4s',
    timingFunction: 'ease-in-out',
    delay: '1s',
    iterationCount: 'infinite',
    animationStyle: `@keyframes customAnimation {
      0% {
        transform: scale(1);
      }
      50% {
        transform: scale(1.2);
      }
      100% {
        transform: scale(1);
      }
    }`
  },
  styles: {
     color: red,
     fontSize: 100px,
  },
  });

  const StyledDiv2 = styled("h1")<StyledDivProps>({
 animation: {
    duration: '4s',
    timingFunction: 'ease-in-out',
    delay: '1s',
    iterationCount: 'infinite',
    animationStyle: `@keyframes customAnimation {
      0% {
        transform: scale(1);
      }
      50% {
        transform: scale(1.2);
      }
      100% {
        transform: scale(1);
      }
    }`
  },
  styles: {
     color: red,
     fontSize: 100px,
  },
  });

  return (
    <>
      <StyledDiv>Hello World!</StyledDiv>
      <StyledDiv2>Hola mundo2</StyledDiv2>
    </>
  );
};

export default App;
10.2.1

3 months ago

10.2.2

3 months ago

10.1.9

3 months ago

10.1.4

5 months ago

10.1.5

5 months ago

10.1.6

5 months ago

10.1.7

5 months ago

10.1.8

5 months ago

10.1.1

5 months ago

10.1.2

5 months ago

10.1.3

5 months ago

10.1.0

5 months ago

10.0.10

5 months ago

10.0.9

5 months ago

10.0.8

5 months ago

10.0.7

5 months ago

10.0.6

5 months ago

10.0.5

5 months ago

10.0.4

5 months ago

10.0.3

5 months ago

10.0.2

5 months ago

10.0.1

5 months ago

10.0.0

5 months ago

1.0.39

5 months ago

1.0.38

5 months ago

1.0.37

5 months ago

1.0.36

5 months ago

1.0.35

5 months ago

1.0.34

5 months ago

1.0.33

5 months ago

1.0.32

5 months ago

1.0.31

5 months ago

1.0.30

5 months ago

1.0.29

5 months ago

1.0.28

5 months ago

1.0.27

5 months ago

1.0.26

5 months ago

1.0.25

5 months ago

1.0.24

5 months ago

1.0.23

5 months ago

1.0.22

5 months ago

1.0.21

5 months ago

1.0.20

5 months ago

1.0.19

5 months ago

1.0.18

5 months ago

1.0.17

5 months ago

1.0.16

5 months ago

1.0.15

5 months ago

1.0.14

5 months ago

1.0.13

5 months ago

1.0.12

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago