Skip to content

Commit

Permalink
Merge pull request #222 from mapbox/label-add-explanation
Browse files Browse the repository at this point in the history
Add more information for label field
  • Loading branch information
badiuoanaalexandra authored Apr 9, 2024
2 parents 29f9feb + 459c745 commit 1948aa1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/control-label/control-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function ControlLabel({
ControlLabel.propTypes = {
/** Value should match the identifying id of the input element. */
id: PropTypes.string.isRequired,
/** Label text */
/** Label text. Label can be string or ReactNode. */
text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
/** Additional content to provide aligned to the right of the label. */
aside: PropTypes.node,
Expand Down
2 changes: 1 addition & 1 deletion src/components/control-range/control-range.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ ControlRange.propTypes = {
onChange: PropTypes.func.isRequired,
/** Accepts an array of numbers, where each number matches a draggable thumb. */
value: PropTypes.array,
/** Value passed to the label element. */
/** Value passed to the label element. Value can be string or ReactNode. */
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
/** If provided the text, "(optional)" is appended to the value of the label element. */
optional: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion src/components/control-text/control-text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ ControlText.propTypes = {
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
/** Type attribute to override the existing default of 'text' */
type: PropTypes.string,
/** Label for the control. */
/** Label for the control. Label can be string or ReactNode. */
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
/** Enable/Disable browser enabled autocorrect or spelling suggestions from the element. */
noAuto: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion src/components/control-textarea/control-textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ ControlTextarea.propTypes = {
* Passed two arguments: the new value, and the `id` prop.
*/
onChange: PropTypes.func.isRequired,
/** Label for the control. */
/** Label for the control. Label can be string or ReactNode. */
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
/** If `true`, autocorrect and spelling suggestions will be disabled. */
noAuto: PropTypes.bool,
Expand Down

0 comments on commit 1948aa1

Please sign in to comment.