Skip to content

Commit

Permalink
docs(textarea): update typedef for config
Browse files Browse the repository at this point in the history
Updated the JSDoc typedef for the Textarea component's config to
accurately reflect the expected properties and types.
  • Loading branch information
chessurisme committed Aug 23, 2024
1 parent 70c3d2d commit 37cc401
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/textarea.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
import { BaseComponent } from './base-component'
import { sanitizeValue } from '@utilities/sanitize-value'

/**
* @typedef {Object} TextareaConfig
* @property {string} id - The ID of the textarea.
* @property {string} className - The class name(s) to be applied to the textarea.
* @property {string} placeholder - The placeholder of the textarea.
* @property {string} [text] - The text value of the textarea.
* @property {boolean} [readOnly] - Indicates whether the textarea is read-only.
* @property {boolean} [hidden] - The visibility of the textarea
*/

/**
* Represents a Textarea component.
*/
class Textarea extends BaseComponent {
/**
* Initializes the textarea instance with the provided configuration.
*
* @param {Object} config - The configuration object for the textarea.
* @param {TextareaConfig} config - The configuration object for the textarea.
*/
constructor(config) {
super(config)
Expand Down

0 comments on commit 37cc401

Please sign in to comment.