@justeat/f-error-message
v2.5.0
Published
Fozzie Error Message – Generic inline error message
Downloads
24
Maintainers
Keywords
Readme
Usage
Installation
This package can be installed using npm or yarn:
You can import it in your Vue SFC like this (please note that styles have to be imported separately):
import ErrorMessage from '@justeat/f-error-message';
import '@justeat/f-error-message/dist/f-error-message.css';
export default {
components: {
ErrorMessage
}
}
If you are using Webpack, you can import the component dynamically to separate the error-message
bundle from the main bundle.client.js
:
import '@justeat/f-error-message/dist/f-error-message.css';
export default {
components: {
...
ErrorMessage: () => import(/* webpackChunkName: "error-message" */ '@justeat/f-error-message')
}
}
Configuration
Props
f-error-message
does not expose any props.
<error-message>Default error message</error-message>
Development
Start by cloning the repository and installing the required dependencies:
$ git clone [email protected]:justeat/fozzie-components.git
$ cd fozzie-components
$ yarn
Change directory to the f-error-message
package:
$ cd packages/components/atoms/f-error-message
Running storybook
Storybook can be used to develop new and existing components.
To start storybook:
Please ensure you are in the f-error-message directory as outlined in the above instructions.
# cd to the storybook package
$ cd ../../../storybook
# Run storybook
$ yarn storybook:serve
This will build and serve storybook at http://localhost:8080.