Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign authored Feb 21, 2023
1 parent fd993bd commit 8087038
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/react-ui-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ import { Button } from '@neos-project/react-ui-components';
```

Since version 8.3 you dont even need to have a css modules plugin for bundling installed.
Its already compiled for you to bare ES2020 Javascript and CSS. So just roll with a simple $bundler script ;)
The lib is already compiled for you to bare ES2020 Javascript and CSS. So just roll with any simple $bundler ;)

## Usage with Icons
## Usage of `<Icon/>`

Icons require you to import and configure fontawesome properly.
Icons require you to import and configure Font Awesome properly.
And example config could look like this:

```js
import { Icon } from '@neos-project/react-ui-components';

import { config, library } from '@fortawesome/fontawesome-svg-core';
// here we import all the solid icons (which is bad wor bundle size, but might be necessary)
// here we import all the solid icons (which is bad for bundle size, but might be necessary)
import { fas } from '@fortawesome/free-solid-svg-icons';
// but you can also only include a certain icon youd like
// but you can also only include a certain icon you'd like
import { faNeos } from '@fortawesome/free-brands-svg-icons/faNeos';
import '@fortawesome/fontawesome-svg-core/styles.css';

Expand All @@ -51,9 +51,9 @@ export const Component = () => (

## Usage within in a Neos.Ui plugin?

You dont actually need to require this pluging when building a pure Neos.Ui Plugin like you dont need react installed aswell. Your plugin will import `@neos-project/react-ui-components` from the "`window` export" of the Neos.Ui Host.
You dont actually need to require this plugin when building a pure Neos.Ui Plugin like you dont need `react` installed as well. Your plugin will import `@neos-project/react-ui-components` from the "`window` export" of the Neos.Ui Host.

You still might want to install this package to have typescript autocompletion and typesafety ;)
You still might want to install this package to have typescript autocompletion and type safety ;)

## Advanced Usage: Without styling

Expand All @@ -76,20 +76,20 @@ import identifiers from '@neos-project/react-ui-components/identifiers';

### Setup

Proceed with the instruction from here: [Neos.Neos.Ui](https://github.com/neos/neos-ui)
Proceed with the instructions from the monorepo: [Neos.Neos.Ui](https://github.com/neos/neos-ui)

### Add the Development version of `@neos-project/react-ui-components`
### Test the development version of `@neos-project/react-ui-components` in your project

Inside your [Neos.Neos.Ui](https://github.com/neos/neos-ui) development Setup navigate to the `@neos-project/react-ui-components` package and build and pack it:
Inside your [Neos.Neos.Ui](https://github.com/neos/neos-ui) development setup build and pack the `@neos-project/react-ui-components`:

```sh
yarn workspace @neos-project/react-ui-components build
yarn workspace @neos-project/react-ui-components pack
```

then you will receive a `package.tgz` which holds essentially the same contents that would have been published to npm.
Then you will receive a `package.tgz` which holds essentially the same contents that would have been published to npm.

you can add it for testing to your other project by simply going to your project and adding the `package.tgz`
You can add it for testing to your project by simply going to your project and adding the `package.tgz`:

```sh
yarn add path/to/the/package.tgz
Expand Down

0 comments on commit 8087038

Please sign in to comment.