diff options
Diffstat (limited to 'packages/forms/src/label/index.tsx')
-rw-r--r-- | packages/forms/src/label/index.tsx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/packages/forms/src/label/index.tsx b/packages/forms/src/label/index.tsx index 1b33ba22c..ad503b785 100644 --- a/packages/forms/src/label/index.tsx +++ b/packages/forms/src/label/index.tsx | |||
@@ -7,7 +7,9 @@ import { IFormField } from '../typings/generic'; | |||
7 | 7 | ||
8 | import styles from './styles'; | 8 | import styles from './styles'; |
9 | 9 | ||
10 | interface ILabel extends IFormField, React.LabelHTMLAttributes<HTMLLabelElement> { | 10 | interface ILabel |
11 | extends IFormField, | ||
12 | React.LabelHTMLAttributes<HTMLLabelElement> { | ||
11 | classes: Classes; | 13 | classes: Classes; |
12 | isRequired: boolean; | 14 | isRequired: boolean; |
13 | } | 15 | } |
@@ -38,11 +40,12 @@ class LabelComponent extends Component<ILabel> { | |||
38 | htmlFor={htmlFor} | 40 | htmlFor={htmlFor} |
39 | > | 41 | > |
40 | {showLabel && ( | 42 | {showLabel && ( |
41 | <span className={classes.label}>{title}{isRequired && ' *'}</span> | 43 | <span className={classes.label}> |
44 | {title} | ||
45 | {isRequired && ' *'} | ||
46 | </span> | ||
42 | )} | 47 | )} |
43 | <div className={classes.content}> | 48 | <div className={classes.content}>{children}</div> |
44 | {children} | ||
45 | </div> | ||
46 | </label> | 49 | </label> |
47 | ); | 50 | ); |
48 | } | 51 | } |