aboutsummaryrefslogtreecommitdiffstats
path: root/packages/forms/src/label/index.tsx
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-07-30 10:54:54 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-30 14:24:54 +0530
commitf4b4416ea52d564bc2dbe543a82084ed98843ccc (patch)
tree7ca6b23571c86458a6b799746c91a7191de02715 /packages/forms/src/label/index.tsx
parent5.6.1-nightly.8 [skip ci] (diff)
downloadferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.tar.gz
ferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.tar.zst
ferdium-app-f4b4416ea52d564bc2dbe543a82084ed98843ccc.zip
chore: migrate from tslint to @typescript-eslint (#1706)
- update .eslintrc to work for .js and .ts - update devDependencies - lint properly both root /src and nested /packages - update webhint recommended setting for tsconfig.json to shrink output - Manage all eslint rules from the repo root - escape single quotes in scripts to please windows build Co-authored-by: Vijay A <avijayr@protonmail.com>
Diffstat (limited to 'packages/forms/src/label/index.tsx')
-rw-r--r--packages/forms/src/label/index.tsx13
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
8import styles from './styles'; 8import styles from './styles';
9 9
10interface ILabel extends IFormField, React.LabelHTMLAttributes<HTMLLabelElement> { 10interface 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 }