Skip to content

Commit

Permalink
refactor(IconSkeleton): convert to TypeScript (#14636)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrea N. Cardona <[email protected]>
  • Loading branch information
sjbeatle and andreancardona authored Sep 12, 2023
1 parent ab4ca8a commit 391c8e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@
*/

import PropTypes from 'prop-types';
import React from 'react';
import React, { ComponentProps } from 'react';
import cx from 'classnames';
import { usePrefix } from '../../internal/usePrefix';

const IconSkeleton = ({ className, ...rest }) => {
export interface IconSkeletonProps extends ComponentProps<'div'> {
/**
* Specify an optional className to add.
*/
className?: string;
}

const IconSkeleton = ({ className, ...rest }: IconSkeletonProps) => {
const prefix = usePrefix();
const props = {
...rest,
};

return (
<div className={cx(`${prefix}--icon--skeleton`, className)} {...props} />
<div className={cx(`${prefix}--icon--skeleton`, className)} {...rest} />
);
};

Expand Down
File renamed without changes.

0 comments on commit 391c8e4

Please sign in to comment.