1

I have this code:

return (
    <Container>
        <Title color={status}>Some Title</Title>
        <Subtitle>
            <Icon color={status} width={`${(value / goal) * 100}%`} />
        </Subtitle>
    </Container>
)

Do you think it would be a better practice to put the styles logics in the styled component file?

1 Answers1

0

I think if styles are much, this is better to put styles logics in another file(e.g styled component). But if styles are little can keep them in the same file in the upper of the definition of a component. because in this case, accessibility to them is easier.

Arman Ebrahimi
  • 2,035
  • 2
  • 7
  • 20