Skip to content

Commit 2b42277

Browse files
rvsiaHyperkid123
authored andcommitted
Add mapper generator
1 parent e518233 commit 2b42277

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

templates/component-mapper/src/files/checkbox.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,23 @@ const SingleCheckbox = (props) => {
2121
return (
2222
<React.Fragment>
2323
<label htmlFor={name}>{label}</label>
24-
<input {...input} id={name} type="checkbox" disabled={isDisabled}/>
24+
<input {...input} type="checkbox" disabled={isDisabled}/>
2525
</React.Fragment>
2626
);
2727
};
2828

29-
const SingleCheckboxInCommon = ({ label, isDisabled, id, ...props }) => (
29+
const SingleCheckboxInCommon = ({ label, isDisabled, ...props }) => (
3030
<React.Fragment>
31-
<label htmlFor={id}>{label}</label>
32-
<input {...props} id={id} type="checkbox" disabled={isDisabled} />
31+
<label htmlFor={props.name}>{label}</label>
32+
<input {...props} type="checkbox" disabled={isDisabled} />
3333
</React.Fragment>
3434
);
3535

3636
SingleCheckboxInCommon.propTypes = {
3737
label: PropTypes.node,
3838
input: PropTypes.object,
3939
isDisabled: PropTypes.bool,
40-
name: PropTypes.string,
41-
id: PropTypes.string
40+
name: PropTypes.string
4241
};
4342

4443
const Checkbox = ({ options, ...props }) =>

yarn.lock

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6049,6 +6049,14 @@ chalk@^1.1.1, chalk@^1.1.3:
60496049
strip-ansi "^3.0.0"
60506050
supports-color "^2.0.0"
60516051

6052+
chalk@^3.0.0:
6053+
version "3.0.0"
6054+
resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
6055+
integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
6056+
dependencies:
6057+
ansi-styles "^4.1.0"
6058+
supports-color "^7.1.0"
6059+
60526060
chalk@^4.0.0:
60536061
version "4.0.0"
60546062
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.0.0.tgz#6e98081ed2d17faab615eb52ac66ec1fe6209e72"
@@ -21465,7 +21473,7 @@ yargs@^14.0.0, yargs@^14.2.0:
2146521473
y18n "^4.0.0"
2146621474
yargs-parser "^15.0.0"
2146721475

21468-
yargs@^15.0.1:
21476+
yargs@^15.0.1, yargs@^15.3.1:
2146921477
version "15.3.1"
2147021478
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b"
2147121479
integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==

0 commit comments

Comments
 (0)