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

121
Views
how to import values to styled components from another file

Im trying to pass a value imported from another file to my styled component , but i get notification from my editor that the syntax is wrong , whats the correct way of writing this or how i can pass the value for the background color to this component?

import { Colors } from "../theme/Theme";

const FootergEl = styled.div`
  position: relative;
  height: 482px;
  width: 100vw;
  margin-top: 196px;
  background-color: `${Colors.Brand.BGFooter}`;
`;
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

the correct way do this is as below

import { Colors } from "../theme/Theme";

const FootergEl = styled.div`
position: relative;
height: 482px;
width: 100vw;
margin-top: 196px;
background-color: ${()=>Colors.Brand.BGFooter};`;
;
about 4 years ago · Santiago Trujillo 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!