Skip to content

Commit

Permalink
refactor(typescript): add TextInputSkeleton types (#13314)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
davesteinberg and kodiakhq[bot] authored Mar 17, 2023
1 parent 03de283 commit d8a6ad4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1076,6 +1076,15 @@
"contributions": [
"code"
]
},
{
"login": "davesteinberg",
"name": "Dave Steinberg",
"avatar_url": "https://avatars.githubusercontent.com/u/3935584?v=4",
"profile": "https://github.com/davesteinberg",
"contributions": [
"code"
]
}
],
"commitConvention": "none"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ check out our [Contributing Guide](/.github/CONTRIBUTING.md) and our
<td align="center"><a href="https://github.com/awarrier99"><img src="https://avatars.githubusercontent.com/u/17476235?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ashvin Warrier</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=awarrier99" title="Code">💻</a></td>
<td align="center"><a href="https://galvingao.com/"><img src="https://avatars.githubusercontent.com/u/12567059?v=4?s=100" width="100px;" alt=""/><br /><sub><b>GalvinGao</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=GalvinGao" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/bianca-sparxs"><img src="https://avatars.githubusercontent.com/u/33003148?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bianca Sparxs</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=bianca-sparxs" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/davesteinberg"><img src="https://avatars.githubusercontent.com/u/3935584?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Dave Steinberg</b></sub></a><br /><a href="https://github.com/carbon-design-system/carbon/commits?author=davesteinberg" title="Code">💻</a></td>
</tr>
</table>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,24 @@ import React from 'react';
import cx from 'classnames';
import { usePrefix } from '../../internal/usePrefix';

const TextInputSkeleton = ({ hideLabel, className, ...rest }) => {
export interface TextInputSkeletonProps
extends React.HTMLAttributes<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 TextInputSkeleton = ({
hideLabel,
className,
...rest
}: TextInputSkeletonProps) => {
const prefix = usePrefix();
return (
<div className={cx(`${prefix}--form-item`, className)} {...rest}>
Expand Down

0 comments on commit d8a6ad4

Please sign in to comment.