Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

169
Views
Se movió de React Native Stylesheet a componentes con estilo. ¿Cómo agregar elevación cuando los componentes con estilo no reconocen la elevación como una propiedad?

Tengo el siguiente componente simple que usaba React Native Stylesheet hasta ahora, pero en este momento estoy tratando de pasar a los componentes con estilo. Estoy un poco confundido sobre cómo aplicar la elevación al componente con estilo, cuando no reconoce la elevación como una propiedad.

 const AuthFooter: FunctionComponent = ({ children }) => <View style={styles.buttonContainer}>{children}</View>; const SCREEN_WIDTH = Dimensions.get('window').width; const StyledView = styled.View` position: 'absolute'; bottom: '0'; width: ${SCREEN_WIDTH}; padding: 20; background-color: ${colors.white}; border-top-color: ${colors.creamTransparent200}; border-top-width: 2; elevation: 10; `; const styles = StyleSheet.create({ buttonContainer: { position: 'absolute', bottom: 0, width: SCREEN_WIDTH, paddingHorizontal: 20, backgroundColor: colors.white, borderTopColor: colors.creamTransparent200, borderTopWidth: 2, elevation: 10, paddingVertical: 20, }, });

exportar AuthFooter predeterminado;

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Desafortunadamente, no es posible usar la elevación en las propiedades css de los componentes con estilo, pero puede agregar una propiedad Ver como esta:

 const StyledView = styled.View.attrs({ buttonContainer: { elevation: 10, } })` position: 'absolute'; bottom: '0'; width: ${SCREEN_WIDTH}; padding: 20; background-color: ${colors.white}; border-top-color: ${colors.creamTransparent200}; border-top-width: 2; `;

Si aún no funciona como esperas, te recomiendo usar esta biblioteca .

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!