Skip to content

Commit

Permalink
fix(web) use right type for icon name at EmptyState
Browse files Browse the repository at this point in the history
It was broken when migration layout/Icon.jsx to layout/Icon.tsx in
#1690
  • Loading branch information
dgdavid committed Oct 29, 2024
1 parent a099d97 commit d9554b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/src/components/core/EmptyState.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
import { Icon } from "~/components/layout";

/**
* @typedef {import("~/components/layout/Icon").IconName} IconName
* @typedef {import("~/components/layout/Icon").IconProps} IconProps
* @typedef {import("@patternfly/react-core").EmptyStateProps} EmptyStateProps
* @typedef {import("@patternfly/react-core").EmptyStateHeaderProps} EmptyStateHeaderProps
*/
Expand All @@ -48,7 +48,7 @@ import { Icon } from "~/components/layout";
*
* @param {object} props
* @param {string} props.title
* @param {IconName} props.icon
* @param {IconProps["name"]} props.icon
* @param {string} [props.color="color-100"]
* @param {EmptyStateHeaderProps["headingLevel"]} [props.headingLevel="h4"]
* @param {boolean} [props.noPadding=false]
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/layout/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const icons = {

const PREDEFINED_SIZES = ["xxxs", "xxs", "xs", "s", "m", "l", "xl", "xxl", "xxxl"];

type IconProps = React.SVGAttributes<SVGElement> & {
export type IconProps = React.SVGAttributes<SVGElement> & {
/** Name of the desired icon */
name: keyof typeof icons;
/** Size used for both, width and height.It can be a CSS unit or one of PREDEFINED_SIZES */
Expand Down

0 comments on commit d9554b1

Please sign in to comment.