Import CSS in Semantic-UI-React

I will use Semantic-UI-React in my project, but I encountered the following problems:

Document Link: https://react.semantic-ui.com/usage#css

  • The docs say webpack 1 is supported but not recommended. I am using the Create React application that comes with the web package version 1.14.0. Does this mean that I should not use Semantic-UI-Reactwith CRA?

  • For styling, I also need some custom styles in my project, so I went with the third package option Semantic UImentioned in the documentation. npm install semantic-ui --save-devruns gulpinternally and creates a folder semantic. But there is no folder distas indicated in the docs. What path should I refer to semantic.min.cssin my index.js file?

I mainly try to use Semantic-UI-Reactwith semantic.min.csswith some of my own styles on top of it. But it looks like I'm wrong in the setup. Another option might be to go with the package Semantic UI CSS? ... but according to the docs I will not be able to use custom styles using this method.

I'm a little confused here, please help :)

+4
source share
1 answer

SUI-React docs , Webpack 1, , Webpack. Webpack 1 . , Create-React-App (1.0) Webpack 2, CRA, react-scripts .

CSS Semantic-UI, , semantic-ui, semantic, Semantic-UI LESS . - SUI . , , gulp build semantic semantic/dist, CSS ( https://semantic-ui.com/introduction/build-tools.html). , CSS , , src JS-.

Semantic-UI CSS, npm install --save semantic-ui-css, Semantic-UI CSS .

, "Practical Redux" Semantic-UI-React semantic-ui-css, , semantic-ui-css Redux, 4: . ( CSS- Semantic-UI "" .)

+7

Source: https://habr.com/ru/post/1679271/


All Articles