@hack4impact-uiuc/bridge
v1.2.7
Published
Hack4Impact UIUC's Design System + React Component library
Downloads
240
Readme
Installation
npm install @hack4impact-uiuc/bridge
or
yarn add @hack4impact-uiuc/bridge
Usage
Import the CSS directly into your project (src/index.js
) if your asset packager supports it:
import '@hack4impact-uiuc/bridge/dist/styles.css'
Import required h4i-design components within src/App.js
file or your custom component files:
import { Button } from '@hack4impact-uiuc/bridge';
Now you are ready to use the imported components, such as:
import React from 'react';
import { Button } from '@hack4impact-uiuc/bridge';
const App = () => (
<Button onClick={() => alert('Button clicked!')}>APPLY NOW</Button>
)
export default App
Theming
Components use Hack4Impact's Design theme by default (src/theme.js
) but you can provide your own theme using styled-component's . You can either fully replace the theme or replace parts of the theme by placing your custom theme through a prop to our components or through <ThemeProvider>
in the root of the application.
Server-side Rendering
This library depends on styled-components. Thus, if you are server rendering React or using a framework like next.js or gatsby, follow styled-component's server rendering setup.
Local Development
We use Storybook to hot-reload and test our components during development. You can edit the playground/Playground.js
file to import and test the components you are working on. Please do not commit any work on the file so other developers can use the same file to test.
To run:
yarn
yarn storybook
Check out our Contributing Guidelines for code style, testing, component dev, etc
Design Library
For design work, use the Figma component library which includes all text styles, components, complete color palette, and proper box shadows as implemented in the React library. Any changes to the master components are reflected through all instances of that component throughout your designs.
To use the library, make a copy into your workspace and create a new page for your designs. All components are accessible through the "Assets" tab as you design on any page.
Refer to the Bridge website for complete design guidelines.
Authors
- Timothy Ko (@tko22)
- Jackie Osborn (@jackieo5023)
- David Wang (@davidenwang)
- Chloe Chan (Product Designer)
License
MIT Copyright (c) 2020-present, Timothy Ko