Skip to content
This repository was archived by the owner on Jun 19, 2023. It is now read-only.

pascaliske/form-elements

Folders and files

NameName
Last commit message
Last commit date
Jan 5, 2023
Oct 26, 2021
Feb 15, 2022
Oct 9, 2020
May 27, 2022
Feb 28, 2022
Jun 14, 2019
Feb 1, 2019
Aug 20, 2018
Feb 15, 2022
Oct 26, 2021
Jun 15, 2020
May 27, 2022
Nov 3, 2022
Nov 3, 2022
Feb 15, 2022
Jun 15, 2020
Jun 7, 2023
Nov 3, 2022
Aug 21, 2019
Feb 15, 2022
Feb 15, 2022
Jul 25, 2020
Feb 20, 2019
Jun 7, 2023

Repository files navigation

Build Status

Installation

To install the module use the following command:

$ yarn add @pascaliske/form-elements

Usage

Import the module in your Angular app:

import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { BrowserModule } from '@angular/platform-browser'
import { FormElementsModule } from '@pascaliske/form-elements'
import { AppComponent } from './app.component'

@NgModule({
    bootstrap: [AppComponent],
    declarations: [AppComponent],
    imports: [CommonModule, BrowserModule, FormElementsModule],
})
export class AppModule {}

Then import the styles in your global scss styles:

@import '~@pascaliske/form-elements/styles';

Note: If you want to use the cmp-f-select, cmp-f-date od cmp-f-time components you also need to add their 3rd-party library styles:

@import '~choices.js/public/assets/styles/choices.min.css'; // cmp-f-select
@import '~flatpickr/dist/flatpickr.min.css'; // cmp-f-date, cmp-f-time

Now you can use the components in your template:

<cmp-f-form>
    <cmp-f-row>
        <cmp-f-column>
            <cmp-f-input [label]="'My text input'"></cmp-f-input>
        </cmp-f-column>
    </cmp-f-row>
</cmp-f-form>

License

MIT © Pascal Iske