jonmbake / react-terminal-ui

A terminal react component with support for light and dark modes.
https://jonmbake.github.io/react-terminal-ui/demo/
MIT License
205 stars 30 forks source link

Can you make the style import seperate? #53

Open majodu opened 2 months ago

majodu commented 2 months ago

Its kind of a pain to override some of the styles.

Is it possible to have the CSS separate from the code?

github-actions[bot] commented 2 months ago

Thank you for taking the time to submit an Issue! You should get a response to this issue within one to two days.

majodu commented 1 month ago

Similar to when you import bootstrap styles import 'bootstrap/dist/css/bootstrap.css';

jonmbake commented 1 month ago

The terminal styling is currently imported: https://github.com/jonmbake/react-terminal-ui/blob/master/src/index.tsx#L4. Currently there is not a great way to override the style that was imported. In order to allow style overrides, I think we'd have to add a prop like:

terminalStyle?: React.CSSProperties;
majodu commented 1 month ago

A simple way would just have the imports separately. You could import the package, and then import the css. This way you import the default styles and then put your own styles underneath to override them.

jonmbake commented 1 month ago

Hi @majodu. Feel to submit a PR.