Skip to content

Commit

Permalink
refactor: convert TextAreaSkeleton to TypeScript (#13275)
Browse files Browse the repository at this point in the history
* refactor: convert TextAreaSkeleton to TypeScript

* chore: remove unneeded omit

* chore: remove unneeded omit

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
sierrawetmore and kodiakhq[bot] authored Mar 13, 2023
1 parent 242256a commit 997d7e2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,20 @@ import React from 'react';
import cx from 'classnames';
import { usePrefix } from '../../internal/usePrefix';

const TextAreaSkeleton = ({ hideLabel, className, ...rest }) => {
export interface TextAreaSkeletonProps
extends React.InputHTMLAttributes<HTMLDivElement> {
/**
* Specify an optional className to add to the form item wrapper.
*/
className?: string;

/**
* Specify whether the label should be hidden, or not
*/
hideLabel?: boolean;
}
const TextAreaSkeleton = (props: TextAreaSkeletonProps) => {
const { className, hideLabel, ...rest } = props;
const prefix = usePrefix();
return (
<div className={cx(`${prefix}--form-item`, className)} {...rest}>
Expand Down
6 changes: 1 addition & 5 deletions packages/react/src/components/TextArea/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ import { useAnnouncer } from '../../internal/useAnnouncer';
import useIsomorphicEffect from '../../internal/useIsomorphicEffect';
import { useMergedRefs } from '../../internal/useMergedRefs';

type ExcludedAttributes = '';
export interface TextAreaProps
extends Omit<
React.InputHTMLAttributes<HTMLTextAreaElement>,
ExcludedAttributes
> {
extends React.InputHTMLAttributes<HTMLTextAreaElement> {
/**
* Provide a custom className that is applied directly to the underlying
* `<textarea>` node
Expand Down

0 comments on commit 997d7e2

Please sign in to comment.