2021-02-20 11:51:44 +01:00
|
|
|
<p align="center">
|
2021-02-20 10:53:26 +00:00
|
|
|
<img src="https://user-images.githubusercontent.com/6702424/80216211-00ef5280-863e-11ea-81de-59f3a3d4b8e4.png">
|
2021-02-20 11:51:44 +01:00
|
|
|
</p>
|
|
|
|
<p align="center">
|
2021-02-20 10:53:26 +00:00
|
|
|
<i>Provides a way to customise Keycloak login and register pages with React</i>
|
2021-02-20 11:51:44 +01:00
|
|
|
<br>
|
|
|
|
<br>
|
2021-02-20 10:53:26 +00:00
|
|
|
<img src="https://github.com/garronej/keycloak-react-theming/workflows/ci/badge.svg?branch=develop">
|
|
|
|
<img src="https://img.shields.io/bundlephobia/minzip/keycloak-react-theming">
|
|
|
|
<img src="https://img.shields.io/npm/dw/keycloak-react-theming">
|
|
|
|
<img src="https://img.shields.io/npm/l/keycloak-react-theming">
|
|
|
|
</p>
|
|
|
|
<p align="center">
|
|
|
|
<a href="https://github.com/garronej/keycloak-react-theming">Home</a>
|
|
|
|
-
|
|
|
|
<a href="https://github.com/garronej/keycloak-react-theming">Documentation</a>
|
2021-02-20 11:51:44 +01:00
|
|
|
</p>
|
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
# Install / Import
|
2021-02-20 11:51:44 +01:00
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
```bash
|
|
|
|
$ npm install --save keycloak-react-theming
|
2021-02-20 11:51:44 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
```typescript
|
2021-02-20 10:53:26 +00:00
|
|
|
import { myFunction, myObject } from "keycloak-react-theming";
|
2021-02-20 11:51:44 +01:00
|
|
|
```
|
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
Specific imports:
|
2021-02-20 11:51:44 +01:00
|
|
|
|
|
|
|
```typescript
|
2021-02-20 10:53:26 +00:00
|
|
|
import { myFunction } from "keycloak-react-theming/myFunction";
|
|
|
|
import { myObject } from "keycloak-react-theming/myObject";
|
2021-02-20 11:51:44 +01:00
|
|
|
```
|
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
## Import from HTML, with CDN
|
2021-02-20 11:51:44 +01:00
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
Import it via a bundle that creates a global ( wider browser support ):
|
2021-02-20 11:51:44 +01:00
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
```html
|
|
|
|
<script src="//unpkg.com/keycloak-react-theming/bundle.min.js"></script>
|
|
|
|
<script>
|
|
|
|
const { myFunction, myObject } = keycloak_react_theming;
|
|
|
|
</script>
|
|
|
|
```
|
2021-02-20 11:51:44 +01:00
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
Or import it as an ES module:
|
2021-02-20 11:51:44 +01:00
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
```html
|
|
|
|
<script type="module">
|
|
|
|
import {
|
|
|
|
myFunction,
|
|
|
|
myObject,
|
|
|
|
} from "//unpkg.com/keycloak-react-theming/zz_esm/index.js";
|
|
|
|
</script>
|
|
|
|
```
|
2021-02-20 11:51:44 +01:00
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
_You can specify the version you wish to import:_ [unpkg.com](https://unpkg.com)
|
2021-02-20 11:51:44 +01:00
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
## Contribute
|
2021-02-20 11:51:44 +01:00
|
|
|
|
2021-02-20 10:53:26 +00:00
|
|
|
```bash
|
|
|
|
npm install
|
|
|
|
npm run build
|
|
|
|
npm test
|
|
|
|
```
|