DocSpace-client/packages/shared/components/label
2023-12-20 17:14:57 +03:00
..
index.ts Shared:Components:Label: rewrite to typescript 2023-12-20 16:59:45 +03:00
Label.stories.tsx Shared:Components: fix storybook 2023-12-20 17:14:57 +03:00
Label.test.tsx Shared:Components:Label: rewrite to typescript 2023-12-20 16:59:45 +03:00
Label.tsx Shared:Components:Label: rewrite to typescript 2023-12-20 16:59:45 +03:00
Label.types.ts Shared:Components:Label: rewrite to typescript 2023-12-20 16:59:45 +03:00
README.md Shared:Components:Label: rewrite to typescript 2023-12-20 16:59:45 +03:00

Label

Component displays the field name in the form

Usage

import { Label } from "@docspace/shared/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