2019-08-09 13:10:24 +00:00
|
|
|
# Label
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```js
|
|
|
|
import { Label } from 'asc-web-components';
|
|
|
|
```
|
|
|
|
|
|
|
|
### <Label>
|
|
|
|
|
|
|
|
Component displays the field name in the form
|
|
|
|
|
|
|
|
#### Usage
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
2019-08-13 08:39:16 +00:00
|
|
|
<Label
|
|
|
|
text="First name:"
|
|
|
|
title={"first name"}
|
|
|
|
htmlFor="firstNameField"
|
|
|
|
display="block"
|
|
|
|
/>
|
2019-08-09 13:10:24 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Properties
|
|
|
|
|
|
|
|
| Props | Type | Required | Values | Default | Description |
|
|
|
|
| ------------------ | -------- | :------: | --------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
| `isRequired` | `bool` | - | - | false | Indicates that the field to which the label is attached is required to fill |
|
|
|
|
| `error` | `bool` | - | - | - | Indicates that the field to which the label is attached is incorrect |
|
2019-08-13 08:39:16 +00:00
|
|
|
| `isInline` | `bool` | - | - | false | Sets the 'display: inline-block' property |
|
|
|
|
| `display` | `string` | - | - | - | Sets the 'display' property |
|
2019-08-09 13:10:24 +00:00
|
|
|
| `title` | `string` | - | - | - | Title |
|
|
|
|
| `truncate` | `bool` | - | - | false | Disables word wrapping |
|
|
|
|
| `htmlFor` | `string` | - | - | - | The field ID to which the label is attached |
|
2019-08-13 08:39:16 +00:00
|
|
|
| `text` | `string` | - | - | - | Text |
|
|
|
|
|
2019-08-09 13:10:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
|