DocSpace-client/web/ASC.Web.Components/src/components/label
2019-12-04 14:38:42 +03:00
..
index.js Merge branch 'master' into feature/components-custom-styling 2019-12-04 14:38:42 +03:00
label.stories.js web: Components: Fixed file names from lebel to label. Added id, className and style property for Label component. Added tests. 2019-11-28 16:13:16 +03:00
label.test.js web: Components: Fixed file names from lebel to label. Added id, className and style property for Label component. Added tests. 2019-11-28 16:13:16 +03:00
README.md web: Components: Fixed file names from lebel to label. Added id, className and style property for Label component. Added tests. 2019-11-28 16:13:16 +03:00

Label

Component displays the field name in the form

Usage

import { Label } from "asc-web-components";
<Label
  text="First name:"
  title="first name"
  htmlFor="firstNameField"
  display="block"
/>

Properties

Props Type Required Values Default Description
className string - - - Class name
display string - - - Sets the 'display' property
error bool - - - Indicates that the field to which the label is attached is incorrect
htmlFor string - - - The field ID to which the label is attached
id string - - - Accepts id
isInline bool - - false Sets the 'display: inline-block' property
isRequired bool - - false Indicates that the field to which the label is attached is required to fill
style obj, array - - - Accepts css style
text string - - - Text
title string - - - Title
truncate bool - - false Disables word wrapping