2.16.0 • Published 9 months ago

phoenix-ui-components v2.16.0

Weekly downloads
225
License
Apache-2.0
Repository
github
Last release
9 months ago

Phoenix UI

Version Downloads

This library was generated with Angular CLI version 10.0.14.

To install the package for reusing components.

npm install phoenix-ui-components
# or
yarn add phoenix-ui-components

Setup

You can see phoenix-app as a reference app that uses this package.

Since the components use some icons and images, you will need to copy these assets to your application. Download these assets from ./src/assets and put them in the src/assets directory of your application. All assets should be served through /assets.

Once you have the assets set up, import the PhoenixUIModule and BrowserAnimationsModule in your NgModule.

import { PhoenixUIModule } from 'phoenix-ui-components';

@NgModule({
  imports: [
    ...
    BrowserAnimationsModule,
    PhoenixUIModule,
    ...
  ],
  ...
})
export class MyModule {}

Styling

Since some Phoenix components use Bootstrap, you will need to add the the Bootstrap stylesheet in the src/index.html file of your app.

<head>
  ...

  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" />
</head>

For theming of components, you will also need to import some global styles into your app.
It can be done by importing the theming file into your app's global styles (styles.scss).

styles.scss

@import 'phoenix-ui-components/theming';

...

Usage

With everything set up, you can use the Phoenix components in your module component(s).

component.html

<app-nav></app-nav>
<app-ui-menu></app-ui-menu>
<!-- Be sure to replace the experiment information (`logo`, `url` and `tagline`). -->
<app-experiment-info logo="assets/images/sample.svg" url="https://home.cern/science/experiments/sample" tagline="SAMPLE Experiment at CERN"></app-experiment-info>
<app-phoenix-menu [rootNode]="phoenixMenuRoot"></app-phoenix-menu>
<div id="eventDisplay"></div>

component.ts

@Component({
  selector: 'app-test',
  templateUrl: './component.html',
  styleUrls: ['./component.scss'],
})
export class TestComponent {
  phoenixMenuRoot = new PhoenixMenuNode('Phoenix Menu', 'phoenix-menu');
}
2.16.0

9 months ago

2.15.1

9 months ago

2.14.1

2 years ago

2.12.0

2 years ago

2.13.0

2 years ago

2.14.0

2 years ago

2.11.4

2 years ago

2.11.0

2 years ago

2.11.1

2 years ago

2.11.2

2 years ago

2.11.3

2 years ago

2.10.0

2 years ago

2.9.0

3 years ago

2.8.0

3 years ago

2.7.0

3 years ago

2.6.0

3 years ago

2.5.0

3 years ago

2.5.2

3 years ago

2.5.1

3 years ago

2.4.0

3 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.0

4 years ago

1.9.0

4 years ago

1.8.0

4 years ago

1.7.0

4 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.2-alpha-2

4 years ago

1.4.2-alpha-1

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.3-alpha.0

4 years ago

1.0.3-alpha.1

4 years ago