0.0.5 • Published 6 years ago

mc-input v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Moon and Crater Input

Simple input wrapper to give all inputs a similar look and feel.

Getting Started

Install it.

npm install mc-input

Add it to your module's imports.

import { McInputModule } from 'mc-input';
...

@NgModule({
  ...
  imports: [
    ...
    McInputModule
  ]
})
export class ...

Using It

The primary component <mc-input-wrapper> has one input property, error, which accepts a boolean. When true, the label and input border animate red. If there is an <mc-input-error>, then the error message slides down in red to let the user know.

Ex:

<mc-input-wrapper [error]="email.touched && email.getError('required')">
  <label>Email</label>

  <input type="email" placeholder="Email" formControlName="email" />

  <mc-input-error>Email is required.</mc-input-error>
</mc-input-wrapper>
0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago