Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

384
Vistas
How can I separate this two arrows using styled-components?

I'm trying to learn styled-components. And I'm trying to re-create the image below. I can do it with CSS but I'm trying to focus all of in styled components.

<Container>
  {sliderItems.map((item) => (
    <Wrapper key={item.id}>
      <Blur>
        <BlurInfo>
          <BlurTitle></BlurTitle>
          <BlurP></BlurP>
        </BlurInfo>
      </Blur>
      <ImageContainer></ImageContainer>
    </Wrapper>
  ))}
  <Arrow>
    <ArrowUpwardTwoToneIcon direction="left" />
  </Arrow>
  <Arrow>
    <ArrowDownwardTwoToneIcon direction="right" />
  </Arrow>
</Container>

style.jsx

export const Arrow = styled.div`
  width: 50px;
  height: 50px;
  background-color: #fff7f7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 0;
  top: 50%;
  cursor: pointer;
  opacity: 0.5;
  z-index: 2;
  transform: translate(0%, -50%);
`

export const Container = styled.div`
  height: calc(100vh - 60px);
  width: 100%;
  background-color: blue;
  position: relative;
  overflow: hidden;

` 

This is my output

This is the image i'm trying to copy

the first image is my output, and the second one is the thing i'm trying to copy

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Pass props (conditions like direction) to the styled component element like below:

  <div>
    <Input defaultValue="@probablyup" type="text" />
    <Input defaultValue="@geelen" type="text" inputColor="rebeccapurple" />
  </div>
const Input = styled.input`
  padding: 0.5em;
  margin: 0.5em;
  color: ${props => props.inputColor || "palevioletred"};
  background: papayawhip;
  border: none;
  border-radius: 3px;
`;

Styled component props

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda