Skip to content

Commit

Permalink
fix: input size property description (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
melaniebmn authored Jan 9, 2025
1 parent 928c19a commit f6fa41b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions packages/web/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ export namespace Components {
*/
"required"?: boolean;
/**
* Size attribute for an input element. Defines max-length as well.
* Size attribute for an input element to provide a visual indication of the expected text length to the user.
*/
"size"?: number;
/**
Expand Down Expand Up @@ -2453,7 +2453,7 @@ declare namespace LocalJSX {
*/
"required"?: boolean;
/**
* Size attribute for an input element. Defines max-length as well.
* Size attribute for an input element to provide a visual indication of the expected text length to the user.
*/
"size"?: number;
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/components/gcds-input/gcds-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ export class GcdsInput {
@Prop() required?: boolean = false;

/**
* Size attribute for an input element.
* Defines max-length as well.
* Size attribute for an input element to provide a visual indication
* of the expected text length to the user.
*/
@Prop() size?: number;

Expand Down
32 changes: 16 additions & 16 deletions packages/web/src/components/gcds-input/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@

## Properties

| Property | Attribute | Description | Type | Default |
| ---------------------- | --------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------ | ----------- |
| `autocomplete` | `autocomplete` | String to have autocomplete enabled | `string` | `undefined` |
| `disabled` | `disabled` | Specifies if an input element is disabled or not. | `boolean` | `false` |
| `errorMessage` | `error-message` | Error message for an invalid input element. | `string` | `undefined` |
| `hideLabel` | `hide-label` | Specifies if the label is hidden or not. | `boolean` | `false` |
| `hint` | `hint` | Hint displayed below the label and above the input field. | `string` | `undefined` |
| `inputId` _(required)_ | `input-id` | Id attribute for an input element. | `string` | `undefined` |
| `label` _(required)_ | `label` | Form field label | `string` | `undefined` |
| `name` _(required)_ | `name` | Name attribute for an input element. | `string` | `undefined` |
| `required` | `required` | Specifies if a form field is required or not. | `boolean` | `false` |
| `size` | `size` | Size attribute for an input element. Defines max-length as well. | `number` | `undefined` |
| `type` | `type` | Set Input types | `"email" \| "number" \| "password" \| "search" \| "text" \| "url"` | `'text'` |
| `validateOn` | `validate-on` | Set event to call validator | `"blur" \| "other" \| "submit"` | `undefined` |
| `validator` | -- | Array of validators | `(string \| ValidatorEntry \| Validator<string>)[]` | `undefined` |
| `value` | `value` | Default value for an input element. | `string` | `undefined` |
| Property | Attribute | Description | Type | Default |
| ---------------------- | --------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ----------- |
| `autocomplete` | `autocomplete` | String to have autocomplete enabled | `string` | `undefined` |
| `disabled` | `disabled` | Specifies if an input element is disabled or not. | `boolean` | `false` |
| `errorMessage` | `error-message` | Error message for an invalid input element. | `string` | `undefined` |
| `hideLabel` | `hide-label` | Specifies if the label is hidden or not. | `boolean` | `false` |
| `hint` | `hint` | Hint displayed below the label and above the input field. | `string` | `undefined` |
| `inputId` _(required)_ | `input-id` | Id attribute for an input element. | `string` | `undefined` |
| `label` _(required)_ | `label` | Form field label | `string` | `undefined` |
| `name` _(required)_ | `name` | Name attribute for an input element. | `string` | `undefined` |
| `required` | `required` | Specifies if a form field is required or not. | `boolean` | `false` |
| `size` | `size` | Size attribute for an input element to provide a visual indication of the expected text length to the user. | `number` | `undefined` |
| `type` | `type` | Set Input types | `"email" \| "number" \| "password" \| "search" \| "text" \| "url"` | `'text'` |
| `validateOn` | `validate-on` | Set event to call validator | `"blur" \| "other" \| "submit"` | `undefined` |
| `validator` | -- | Array of validators | `(string \| ValidatorEntry \| Validator<string>)[]` | `undefined` |
| `value` | `value` | Default value for an input element. | `string` | `undefined` |


## Events
Expand Down

0 comments on commit f6fa41b

Please sign in to comment.