EasyUI Forum
May 07, 2024, 04:50:54 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Cannot Apply Theme in react  (Read 6453 times)
spider58
Newbie
*
Posts: 32


View Profile
« on: December 04, 2018, 05:41:10 AM »

Hi,

Code:
@import 'easyui/themes/default/easyui.css';
@import 'easyui/themes/icon.css';
@import 'easyui/themes/react.css';


Is there any thing to do for theme define? because  i can't see themed objects
« Last Edit: December 04, 2018, 06:30:21 AM by spider58 » Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: December 04, 2018, 06:47:24 AM »

Try this code instead.
Code:
@import '~rc-easyui/dist/themes/default/easyui.css';
@import '~rc-easyui/dist/themes/icon.css';
@import '~rc-easyui/dist/themes/react.css';
Logged
spider58
Newbie
*
Posts: 32


View Profile
« Reply #2 on: December 04, 2018, 07:15:22 AM »

Try this code instead.
Code:
@import '~rc-easyui/dist/themes/default/easyui.css';
@import '~rc-easyui/dist/themes/icon.css';
@import '~rc-easyui/dist/themes/react.css';

Doesn't worked.

my.main.css is in css folder. This is my folder structure. I seeing css files loaded without any problem with my codes (at F12 developer tools). But can't apply theme.


dist
     css
          easyui
              themes
              .
              .
              .
           my.main.css
index.html
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #3 on: December 04, 2018, 07:12:25 PM »

After install the 'rc-easyui', the package will be installed in 'node_modules/rc-easyui' directory. You can put this lines to the 'index.css' file that is in your project.
Code:
@import '~rc-easyui/dist/themes/material-teal/easyui.css';
@import '~rc-easyui/dist/themes/icon.css';
@import '~rc-easyui/dist/themes/react.css';

And then import the 'index.css' file in your 'index.js'.
Code:
import './index.css';
Logged
spider58
Newbie
*
Posts: 32


View Profile
« Reply #4 on: December 04, 2018, 11:26:08 PM »

After install the 'rc-easyui', the package will be installed in 'node_modules/rc-easyui' directory. You can put this lines to the 'index.css' file that is in your project.
Code:
@import '~rc-easyui/dist/themes/material-teal/easyui.css';
@import '~rc-easyui/dist/themes/icon.css';
@import '~rc-easyui/dist/themes/react.css';

And then import the 'index.css' file in your 'index.js'.
Code:
import './index.css';

thanks. i tried it but getting invalid character "@" error. I think something wrong with my webpack.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!