0.8.3 • Published 11 months ago

@amalitech-design-system/angular v0.8.3

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

Amalitech Design System and Angular

This is the angular components wrapper for amalitech-design-system

Setup

First, install the package:

npm install @amalitech-design-system/core
npm install @amalitech-design-system/angular

Then load the component library in main.ts:

// src/main.ts
import { applyPolyfills, defineCustomElements } from "@amalitech-design-system/core/loader";

applyPolyfills().then(() => {
  defineCustomElements(window);
});

After that, load the CSS in the angular.json config file:

// angular.json
{
  "build": {
    "styles": ["@amalitech-design-system/core/dist/amalitech-design-system/amalitech-design-system.css"]
  }
}

In order for Angular to handle non-Angular element names, include the wrapper at the root of your project: src/app/app.component.ts:

// src/app/app.component.ts
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterOutlet } from '@angular/router';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [RouterOutlet],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  templateUrl: './app.component.html',
  styleUrl: './app.component.css'
})
export class AppComponent {
  title = 'angular';
}

You should now be able to use ADS components in your templates:

<div>
  <amalitech-button>Click!</amalitech-button>
</div>

Adding ADS Utilities

To add utilities, add the utilities to the styles in your angular.json file:

// angular.json
{
  "build": {
    "styles": [
      "@amalitech-design-system/core/dist/amalitech-design-system/amalitech-design-system.css",
      "@amalitech-design-system/utilities/dist/main.css"
    ]
  }
}

For more information view our full documentation on Storybook

0.8.1

1 year ago

0.8.0

1 year ago

0.8.3

11 months ago

0.8.2

1 year ago

0.7.0

1 year ago

0.6.2

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.3.7

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.2

1 year ago