When I was building my application, I didn't realize that I am going to end up with more than a hundred styled components. Consequently, I was putting them in the same file like this:
export const StyledTabs = styled(Tabs)`
display: inline-flex !important;
margin-left: 15% !important;
`;
export const StyledTab = styled(Tab)`
display: inline-flex !important;
margin-left: 0% !important;
padding: 0 !important;
`;
... And the application imports them like this:
import { StyledTabs, StyledTitle } from "StyledComponents";
I want to split the StyledComponents.js
file into multiple files by, for example, UI logic (header, footer, containers, etc..) but somehow, import them back into StyledComponents.js
so I don't have to refactor the entire application.
Is something like this possible:
HeaderSC.js
export const StyledTabs = styled(Tabs)`
display: inline-flex !important;
margin-left: 15% !important;
`;
export const StyledTab = styled(Tab)`
display: inline-flex !important;
margin-left: 0% !important;
padding: 0 !important;
`;
StyledComponents.js
import { StyledTabs, StyledTitle } from "../styling/HeaderSC";
..and then the app still referring to StyledTabs
or any other styled component from StyledComponents.js
file?