Skip to content

jberglund/designsystem

Repository files navigation

ffe-system-message-react

Install

$ npm install --save ffe-system-message-react

Usage

Like all React packages in FFE, this package expects the package ffe-system-message to be imported in your project's main css- or less-file.

Import one or more of the three predefined message types, passing a header as a prop and content as component children.

import { SystemInfoMessage, SystemErrorMessage } from 'ffe-system-message-react';

<SystemInfoMessage header="En nyttig beskjed">
    Alt du sender inn her rendres i et p-element
</SystemInfoMessage>

Examples

The current version of the package can be seen in the SB1 Design Manual at REMOVED.

Development

To run a standalone (and extremely simple) application for testing changes to either this component or its sibling CSS package. Clone this repo and run

$ npm install && npm run dev

This should spin up a server on localhost:3000.

For testing changes to the CSS package, first run npm link in the root of the cloned ffe-system-message pacakge and then run npm link ffe-system-message in the root of this package. Changes in the CSS file(s) should reflect immediately in the app running on port 3000.

About

SpareBank 1's design system and component library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 79.7%
  • Less 18.1%
  • HTML 1.2%
  • CSS 0.8%
  • Makefile 0.1%
  • Handlebars 0.1%