1.0.2 • Published 3 years ago

angular-kawaii v1.0.2

Weekly downloads
10
License
MIT
Repository
github
Last release
3 years ago

AngularKawaii

Version npm

This is the Angular port of the awesome react-kawaii component library. All credit goes to Elizabet Oliveira.

Example

React Kawaii Example

Contribute

Contributions are more than welcome. You can take an existing component from the react-kawaii project and port it to Angular. It is basically a copy & paste, with some exceptions:

  • We need to add a svg prefix so that the Angular compiler knows that we'r rendering a SVG. So <g ...></g> turns into <svg:g ..></svg:g>.
  • We need to tell Angular that we are using attribute bindings instead of the default property binding. So <svg:g [d]="paths" ...> has to be <svg:g [attr.d]="paths"...>
  • We can't use component selectors if we are splitting our kawaiis into multiple components. SVG does not like that. We have to use atttribute selectors for that.

This project was generated with Angular CLI version 8.3.6.

Run

// 1.)
npm install angular-kawaii

// 2.) Import the AngularKawaiiModule

import { AngularKawaiiModule } from 'angular-kawaii';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, AngularKawaiiModule],
  providers: [],
  bootstrap: [AppComponent],
  schemas: []
})
export class AppModule {}

// 3.) Usage

<Planet mood="happy" color="#A6E191"></Planet>
1.0.2

3 years ago

1.0.1

4 years ago

1.0.0

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago