Skip to content

Commit 891b2d3

Browse files
committed
fix(forms): allow jsx elements on checkbox, radio and switch value labels
1 parent fc1561f commit 891b2d3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/forms/FormCheckbox.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function FormCheckbox({ id, name, required: _required, valueLabel, disabl
3030
FormCheckbox.propTypes = {
3131
id: PropTypes.string.isRequired,
3232
name: PropTypes.string.isRequired,
33-
valueLabel: PropTypes.string,
33+
valueLabel: PropTypes.node,
3434
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
3535
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
3636
};

src/forms/FormRadio.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ FormRadio.propTypes = {
4141
inline: PropTypes.bool,
4242
name: PropTypes.string.isRequired,
4343
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
44-
valueLabel: PropTypes.string,
44+
valueLabel: PropTypes.node,
4545
};

src/forms/FormSwitch.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export function FormSwitch({ id, name, required: _required, trueLabel, falseLabe
3030

3131
FormSwitch.propTypes = {
3232
disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
33-
falseLabel: PropTypes.string,
33+
falseLabel: PropTypes.node,
3434
id: PropTypes.string.isRequired,
3535
name: PropTypes.string.isRequired,
3636
required: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
37-
trueLabel: PropTypes.string,
37+
trueLabel: PropTypes.node,
3838
};

0 commit comments

Comments
 (0)