Install the library.
You can install the library using the npm install
command. To install the library, run the following command:
npm install @metro-ui/components
Add the theme.css
In your angular.json
file add the path to the theme.css file as below:
"styles": [ "src/styles.scss", "node_modules/@metro-ui/components/theme/assets/theme.css" ]
Install the necessary dependency packages
Install the necessary npm packages by running the below commands:
npm install @fortawesome/angular-fontawesome@0.13.0
npm install @fortawesome/fontawesome-svg-core@6.2.1
npm install @fortawesome/free-regular-svg-icons@6.4.0
Import the necessary modules:
To use the components you can import the respective modules. e.g. Import a button module in the app.module.ts
file as below.
import { ButtonModule } from '@metro-ui/components/button';
Use the component
To use the component apply it in your html or component files. e.g. To display a metro button use wp-button as below:
<button wp-button>Hello World</button>