Skip to content

Commit 4c37828

Browse files
authored
Merge pull request #109 from opensrc0/develop
Readme.md
2 parents 2c54b88 + 32fbf8f commit 4c37828

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

.github/COMPONENT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
1. Button
2+
2. Input
3+
3. Chip

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,15 @@ $ bun add fe-theme
6868

6969
## Usage
7070

71-
#### 1. Passing configuration settings to the fe-theme library using ThemeProvider
71+
#### 1. Use fe-theme in your application using themeProvider
7272

7373
```js
74-
import React from 'react';
75-
import ReactDOM from 'react-dom';
76-
import { ThemeProvider } from 'styled-components';
77-
import Init from 'fe-theme/Init';
74+
import { ThemeProvider } from 'styled-components'; // import ThemeProvider component
75+
import Init from 'fe-theme/Init'; // import Init function
7876
import App from './App';
7977

8078
ReactDOM.createRoot(document.getElementById('root')).render(
79+
// Wrap your application with ThemeProvider
8180
<ThemeProvider theme={Init()}>
8281
<App />
8382
</ThemeProvider>
@@ -91,29 +90,31 @@ import Button from 'fe-theme/Button';
9190
<Button />
9291
```
9392

94-
Wow, the configuration is quite simple, but wait... button design is different in my application. No worry, fellow step 3, 4.
93+
Wow, the configuration is quite simple, but wait... button design is different in my application. No worry, follow step 3, 4.
9594

96-
#### 3. Creating a fe-theme folder in your application. It contains config files of components.
95+
#### 3. Creating a fe-theme folder in your application. It contains components config file.
9796

98-
Create config file for all the component of fe-theme
97+
&nbsp;&nbsp;Create config file for all the component of fe-theme
9998
```js
10099
COMPONENT_CONFIG_PATH=./{PATH} CURRENT_APP_DIR=$(pwd) npm run theme-prepare --prefix ./node_modules/fe-theme
101100
```
102101

103-
Create config file for a single component of fe-theme
102+
<p align="center">OR</p>
103+
104+
&nbsp;&nbsp; Creating config file for an individual component
104105
```js
105106
COMPONENET_NAME={COMPONENT_NAME} COMPONENT_CONFIG_PATH=./{PATH} CURRENT_APP_DIR=$(pwd) npm run theme-prepare --prefix ./node_modules/fe-theme
106107
```
107108

108-
**Note:**
109-
```PATH``` is a variable i.e. where you want to place config files for your application
110-
```COMPONENT_NAME``` is a variable i.e. where ```component``` Input, button, CHIP (Allow any case)
109+
&nbsp;&nbsp; **Note:**
110+
111+
&nbsp;&nbsp; ```1. PATH``` is a variable i.e. where you want to place config files in your application
112+
113+
&nbsp;&nbsp; ```2. COMPONENT_NAME``` is a variable i.e. name of the component ```Input```, ```button```. [Find the component list](./.github/COMPONENT.md)
111114

112115
#### 4. Passing configuration settings to the fe-theme library using ThemeProvider
113116

114117
```js
115-
import React from 'react';
116-
import ReactDOM from 'react-dom';
117118
import { ThemeProvider } from 'styled-components';
118119
import Init from 'fe-theme/Init';
119120
import theme from '{PATH}/fe-theme/universal/theme'; // Include your theme to fe-theme
@@ -127,7 +128,7 @@ ReactDOM.createRoot(document.getElementById('root')).render(
127128
);
128129
```
129130

130-
**Note:** ```PATH``` is a variable i.e. location of config files for your application
131+
**Note:** ```PATH``` is a variable i.e. location of config files in your application
131132

132133
**Hurrah...!!!** Now you can change button(any compponent) property according to your application
133134

0 commit comments

Comments
 (0)