Skip to content

discovery-tecnologia/dsc-polymer-form-contact

Repository files navigation

<dsc-polymer-form-contact>

Build Status Bower version

Basic and standard form component with Polymer. This project use Google Material Design.

demo

Demo

$ git clone https://github.com/discovery-tecnologia/dsc-polymer-form-contact.git
$ cd dsc-polymer-form-contact
$ npm install
$ npm install -g polymer-cli
$ polymer serve

Open browser: http://localhost:8080/components/dsc-polymer-form-contact/demo/index.html

Usage

Install with:

$ bower i dsc-polymer-form-contact --save

Example usage:

<dsc-polymer-form-contact language="br" 
                          endpoint="http://my-site/my-api" 
                          on-response-success="myHandlerFunction"></dsc-polymer-form-contact>

API

Property

Name Type Description Default
language String Translate the form messages and labels en
endpoint String Endpoint API http://localhost:3000/api/contact

Styling

Custom property Description Default
--button-max-width Max width button 100%
--button-align Align button in form (left/right) center
--button-background-color Background color button 100%
--button-font-color Text font color button center

Events

Name Description
response-success Listen to the response event ok. Provides the response object to another element.

The file locales.json contains the map of languages translated (EN,BR,ES).

Test

Check sintax and execute selenium tests.

$ npm test

TODO

  • more tests

About

Basic and standard form contact with Polymer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages