municipio-react-ui 0.3.0
Install from the command line:
Learn more about npm packages
$ npm install @helsingborg-stad/municipio-react-ui@0.3.0
Install via package.json:
"@helsingborg-stad/municipio-react-ui": "0.3.0"
About this version
Library of accessible & reusable React UI components for developing interactive module/plugins on helsingborg.se and other websites built with Municipio (Open Source Theme for Wordpress).
- UI Components depends on CSS styles from helsingborg-stad/styleguide
- UI Components are written in TypeScript
- Library can be used without Wordpress just as long the styleguide CSS is included
# using npm
npm install @helsingborg-stad/municipio-react-ui
# using yarn
yarn add @helsingborg-stad/municipio-react-ui
Include the latest styleguide and fonts in your app:
<!-- styleguide css -->
<link
rel="stylesheet"
id="styleguide-css"
type="text/css"
href="http://v2.styleguide.helsingborg.se/assets/dist/css/styleguide-css.min.css"
media="all"
/>
<!-- roboto font -->
<link
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,400;1,500&display=swap"
rel="stylesheet"
/>
<!-- material icons -->
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
Stylesheet can also be built & imported as a ES6 module but it requires your build pipeline to support SASS.
import { Button, Icon } from '@helsingborg-stad/municipio-react-ui'
const App = () => (
<>
<Icon name="phone">
<Button>Example button</Button>
</>
);
git clone helsingborg-stad/municipio-react-ui
cd municipio-react-ui
yarn
yarn start
Open your browser and visit http://localhost:6006.
yarn lint
yarn format
yarn test
You can submit any ideas as pull requests or as GitHub issues.
- helsingborg-stad/styleguide
- helsingborg-stad/Municipio
- helsingborg-stad/component-lib
- helsingborg-stad/modularity