@citydna/common
TypeScript icon, indicating that this package has built-in type declarations

2.5.1 • Public • Published

@citydna/common

A branded component library for Melbourne CityDNA. Check out the Storybook for examples of most components. For everything else, use @material-ui/core.

Installation

$ yarn add @citydna/common @material-ui/core @material-ui/icons

Usage

Most importantly, wrap your app in the <Theme /> component. After that, go for gold. You can play with the example below in codesandbox.

import React from "react"
import { Button, Header, InsetWrap, Theme, Title } from "@citydna/common"

export const MyComponent = () => (
  <Theme variant="dark">
    <Header microBranding right={<Button variant="text" color="default" size="small">Click me</Button>} />
    <InsetWrap>
      <Title primary="Easily build branded UIs" secondary="That look and feel great too.">
      <Button>Lovin' life?</Button>
    </InsetWrap>
  </Theme>
)

// note: You only need to wrap your whole app with <Theme /> once - unless you want to nest themes.

Available components

Check the storybook for interactive demos and usage.

  • Alert
  • Button
  • CounterInput
  • Dialog
  • Header
  • HorizontalTileGrid
  • ReactMarkdownMui
  • InsetWrap
  • Logo
  • MicroLogo
  • ResultsList
  • SearchForm
  • Select
  • Skrim
  • Snackbars
  • Subtitle
  • TextField
  • Theme
  • Title
  • VerticalTileGrid

City DNA icons

When adding a new icon to this package follow these steps:

  1. Add the .svg file to the application specific dir i.e. /aboriginal-melbourne and copy the code into a new .ts file with the same name (follow an existing .ts file as an example)
  2. from /packages/common run yarn build:icons

Readme

Keywords

none

Package Sidebar

Install

npm i @citydna/common

Weekly Downloads

4

Version

2.5.1

License

MIT

Unpacked Size

864 kB

Total Files

394

Last publish

Collaborators

  • spatial_andrewc
  • danzam_com