diff options
author | 2019-04-10 16:40:11 +0200 | |
---|---|---|
committer | 2019-04-10 16:40:11 +0200 | |
commit | fa1f764e4eb4df1c8fcc9b79b58ceeac3d63cdb4 (patch) | |
tree | 2051271328c390be6c78b0a214c948e0c0c5f865 /packages/forms/src/label/index.tsx | |
parent | add context menu for workspace drawer items (diff) | |
parent | test package order (diff) | |
download | ferdium-app-fa1f764e4eb4df1c8fcc9b79b58ceeac3d63cdb4.tar.gz ferdium-app-fa1f764e4eb4df1c8fcc9b79b58ceeac3d63cdb4.tar.zst ferdium-app-fa1f764e4eb4df1c8fcc9b79b58ceeac3d63cdb4.zip |
merge conflicts with latest develop
Diffstat (limited to 'packages/forms/src/label/index.tsx')
-rw-r--r-- | packages/forms/src/label/index.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/forms/src/label/index.tsx b/packages/forms/src/label/index.tsx index 590270a06..1b33ba22c 100644 --- a/packages/forms/src/label/index.tsx +++ b/packages/forms/src/label/index.tsx | |||
@@ -9,6 +9,7 @@ import styles from './styles'; | |||
9 | 9 | ||
10 | interface ILabel extends IFormField, React.LabelHTMLAttributes<HTMLLabelElement> { | 10 | interface ILabel extends IFormField, React.LabelHTMLAttributes<HTMLLabelElement> { |
11 | classes: Classes; | 11 | classes: Classes; |
12 | isRequired: boolean; | ||
12 | } | 13 | } |
13 | 14 | ||
14 | class LabelComponent extends Component<ILabel> { | 15 | class LabelComponent extends Component<ILabel> { |
@@ -24,6 +25,7 @@ class LabelComponent extends Component<ILabel> { | |||
24 | className, | 25 | className, |
25 | children, | 26 | children, |
26 | htmlFor, | 27 | htmlFor, |
28 | isRequired, | ||
27 | } = this.props; | 29 | } = this.props; |
28 | 30 | ||
29 | if (!showLabel) return children; | 31 | if (!showLabel) return children; |
@@ -36,7 +38,7 @@ class LabelComponent extends Component<ILabel> { | |||
36 | htmlFor={htmlFor} | 38 | htmlFor={htmlFor} |
37 | > | 39 | > |
38 | {showLabel && ( | 40 | {showLabel && ( |
39 | <span className={classes.label}>{title}</span> | 41 | <span className={classes.label}>{title}{isRequired && ' *'}</span> |
40 | )} | 42 | )} |
41 | <div className={classes.content}> | 43 | <div className={classes.content}> |
42 | {children} | 44 | {children} |