wdjungst / create-repack-app

A cli to build a rails application with create-react-app
90 stars 11 forks source link

Opt out of CSS framework #31

Open claytoncrockett opened 5 years ago

claytoncrockett commented 5 years ago

Been looking into creating a flag to opt out of using a css framework. This would require basically creating an alternate client setup consisting of components that don't use semantic for their styling. Wondering if anyone else has interest in this use case, if there is interest I would be happy to start poking through it.

wdjungst commented 5 years ago

As an alternative you could use styled components with the same name and import them from a file and simply exclude the css file. This way you would have to change the components except for the import path.

claytoncrockett commented 5 years ago

Yeah that works for me. Correct me if I'm wrong, but this would require still making duplicates of all of the components, where the only different is the import { Form } from "semantic-ui-react"; would be changed to like import { Form } from "custom-styled-components";

(generic example)

Or is there a way to conditionally insert that import and keep it to just the original files?