1.1.2 • Published 2 years ago
gt-btn-plugin v1.1.2
Plugin to use button
npm install gt-btn-plugin
Simple button component
import {ButtonComponent} from gt-btn-plugin/dist/Button
or
import ButtonComponent from get-btn-plugin/dis/Button/ButtonComponent
- This is simple button. Normal html button without any stlying
- Define property for the button. Default value of type is text.
<ButtonComponent
type="text"
title="Test button"
/>
Style button component
import {StyleButton} from gt-btn-plugin/dist/Button
or
import StyleButton from get-btn-plugin/dis/Button/StyleButton
- This is html button but we have added some styling effect to this button.
- Define property for the button. Default value of type is text.
<StyleButton
type="text"
title="Test button"
/>
Input field component
import {InputElementComponent} from gt-btn-plugin/dist/Button
or
import InputElementComponent from get-btn-plugin/dis/Button/InputElementComponent
- This is simple input field component.
- Use need to just add props that was metion into the below example.
- define type
- define placeholder text
- define name property
- define value property
- define change handler event.
- define isNotValid property that have boolean value True | False
- Define message property that have string value. Value must be related to validation message
<InputElementComponent
type="email"
lableText="
placeholderText="test@test.com"
name="detail"
value={detail}
changeEvent={(e) => setDetail(e.target.value)}
isNotValid={detail === ""}
message="Please enter detail"
/>