From cb4bfc613545a2875f0bb46ba5625c05b8461f89 Mon Sep 17 00:00:00 2001 From: Leesa Ward Date: Sun, 29 Sep 2024 14:52:04 +1000 Subject: [PATCH] Add proper README documentation (#32) --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cb067cf..bbe7cb2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,49 @@ # Redback UI Design system and UI component library for React, designed for Redback's data-driven applications. -**[View the live Storybook and documentation](https://redback-operations.github.io/redback-ui/)** + - [Live Storybook and documentation](https://redback-operations.github.io/redback-ui/) + - [Release notes](https://github.com/Redback-Operations/redback-ui/tags) + +## Installation + +To install Redback UI in a React project, run: + +```bash +npm install @redbackops/redback-ui +``` + +To update Redback UI to the latest version in an existing project, run one of the following: +```bash +npm update @redbackops/redback-ui +``` +```bash +npm install @redbackops/redback-ui@latest +``` + +## Getting started + +To use Redback UI, wrap your application (or the part of it that you want to style with Redback UI) in the `RedbackUiThemeProvider` component. + +The below example includes selecting the "Redback Smartbike" bundled theme. You can see all of the available themes in the [Storybook](https://redback-operations.github.io/redback-ui/?path=/docs/design-tokens-colours--docs). + +```jsx +import { RedbackUiThemeProvider } from '@redbackops/redback-ui'; +import themes from '@redbackops/redback-ui/themes'; + + + { /* Your app here */ } + +``` + +If you are using Redback UI outside of Redback Operations, you can pass in your own custom theme object. See the structure of the [default theme](https://github.com/Redback-Operations/redback-ui/blob/main/src/themes/default.ts) for guidance on the design tokens to include. + + +## Contributing + +Redback UI is primarily worked on by students in Deakin University's School of IT capstone program, but we welcome external contributions. + +To find out more about how Redback UI is built and how to contribute, please see the Redback Operations developer documentation, in particular: +- [Creating a new component](https://redback-operations.github.io/redback-documentation/docs/web-mobile-app-dev/frontend/new-components) +- [Using Styled Components](https://redback-operations.github.io/redback-documentation/docs/web-mobile-app-dev/frontend/styled-components) +- [Automated tests](https://redback-operations.github.io/redback-documentation/docs/web-mobile-app-dev/frontend/tests) +- [Submitting code](https://redback-operations.github.io/redback-documentation/docs/web-mobile-app-dev/frontend/submitting-work). \ No newline at end of file diff --git a/package.json b/package.json index d83e602..43c890d 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "git", "url": "https://github.com/Redback-Operations/redback-ui" }, - "version": "0.0.1", + "version": "0.0.2", "type": "module", "license": "MIT", "exports": "./dist/index.js",