Skip to content

Commit d5c2f06

Browse files
authored
Merge pull request #238 from Hipo/next-release
v1.1.2 Release
2 parents 45c14f4 + 6a6ab09 commit d5c2f06

File tree

9 files changed

+1215
-97
lines changed

9 files changed

+1215
-97
lines changed

.github/workflows/new-version.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Setup repo
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: Setup Node.js
16-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v4
1717
with:
1818
node-version: 18.0.0
1919

@@ -24,7 +24,7 @@ jobs:
2424
run: npm run build
2525

2626
- id: publish-to-npm
27-
uses: JS-DevTools/npm-publish@v1
27+
uses: JS-DevTools/npm-publish@v3
2828
with:
2929
token: ${{ secrets.NPM_TOKEN }} # This token should be added from repo settings
3030

.github/workflows/pr-preview.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616

1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Setup Node.js
22-
uses: actions/setup-node@v1
22+
uses: actions/setup-node@v4
2323
with:
24-
node-version: 14
24+
node-version: 18
2525

2626
- name: Install dependencies and build storybook
2727
run: |

README.md

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
### @hipo/react-ui-toolkit 🧩
1+
# @hipo/react-ui-toolkit 🧩
22

3-
Hipo's React based UI Toolkit / [Demo](https://react-ui-toolkit.now.sh/)
3+
Bakers' React based UI Toolkit
44

5-
### Usage
5+
## Getting started
66

7-
After installing the `@hipo/react-ui-toolkit` package you can start with simple example
7+
First, install the package via npm:
8+
9+
```bash
10+
npm install @hipo/react-ui-toolkit
11+
```
12+
13+
After installing the package you should import the main CSS file to gather the initial styles of the components, and then import the components you want to use in your project.:
814

915
```javascript
1016
import {FormField, Input} from "@hipo/react-ui-toolkit/dist/Input";
@@ -30,40 +36,65 @@ function LoginForm() {
3036
}
3137
```
3238

33-
### Styling
39+
### How to style components?
3440

3541
Every component holds a minimum amount of CSS. You can modify them via the CSS variables. See `_colors.scss` and `_measurement.scss`
3642

37-
Here is a simple example that shows how to customize `Button` and `Input`
43+
Here is a simple example that shows how to customize `Button` and `Input` styles by overriding the default CSS variables:
44+
45+
```scss
46+
.button {
47+
// Override the default button styles using CSS variables
3848

39-
```css
40-
// _button.css
41-
.primary-button {
4249
--button-bg: #989898;
4350
--button-color: black;
4451
}
4552

46-
// _input.css
4753
.input {
54+
// Override the default input styles using CSS variables
55+
4856
--default-border-color: black;
4957
}
5058
```
5159

60+
## Development
61+
62+
[Storybook](#storybook) is suggested for the development environment. It allows you to see the components in isolation and interact with them. It also supports hot-reloading, i.e. when you change the component, it automatically reloads the component in the browser.
63+
64+
First of all, you need to install the dependencies, in the project root folder, run:
65+
66+
```bash
67+
npm install
68+
```
69+
70+
> ⚠️ Make sure you are using the exact version of `node` and `npm` that are specified in the `engines` field of [package.json](/package.json) file. Otherwise, you may face some unexpected issues.
71+
5272
### Storybook
5373

54-
- To run Storybook `npm run storybook`
55-
- To generate Storybook build `npm run storybook:build`
74+
Storybook is a development environment for UI components. It allows you to browse a component library, view the different states of each component, and interactively develop and test components.
75+
76+
To run the Storybook development server on your local environment, you can use the following command:
77+
78+
```bash
79+
npm run storybook
80+
```
81+
82+
To generate a static build of the Storybook (usually, you don't need this. This is only necessary when you want to publish it to somewhere), you can use the following command:
5683

57-
### Development
84+
```bash
85+
npm run storybook:build
86+
```
5887

59-
For recommended `node` and `npm` versions, you can check `package.json`
88+
### Production Build
6089

61-
You can start to development with `npm run dev` command. The command watches for changes and builds the toolkit. If you want to generate a production ready build you can use `npm run build`.
90+
The production deployment is automated by GitHub Actions. Check the [.github/workflows/new-version.yml](/.github/workflows/new-version.yml) file for more information.
6291

63-
Or you can run `npm run storybook` to see the components live. Storybook has own Webpack config that compiles and runs the components.
92+
---
6493

65-
### Linter
94+
If you need to generate a production ready build for some reason, use:
6695

67-
ESLint and Prettier will handle the linting task. You can set a watcher for `npm run prettify` command in your IDE otherwise you need to run prettier manually or right before the production build it'll automatically runs.
96+
```bash
97+
npm run build
98+
```
6899

69-
The ruleset can be found in [@hipo/eslint-config-base](https://github.com/Hipo/eslint-config-hipo-base), [@hipo/eslint-config-react](https://github.com/Hipo/eslint-config-hipo-base)
100+
This will generate a `dist` folder that contains the compiled components.

0 commit comments

Comments
 (0)