Skip to content

Commit

Permalink
web: type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dgdavid committed Jul 11, 2024
1 parent 07ed057 commit 7011ca0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions web/src/components/core/EmptyState.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ import { Icon } from "~/components/layout";
* @param {string} props.title
* @param {IconName} props.icon
* @param {string} props.color
* @param {Pick<EmptyStateHeaderProps, "headingLevel">} [props.headingLevel="h4"]
* @param {EmptyStateHeaderProps["headingLevel"]} [props.headingLevel="h4"]
* @param {boolean} [props.noPadding=false]
* @param {React.ReactNode} props.children
* @param {EmptyStateProps} [props.props]
* @param {EmptyStateProps} [props.rest]
* @todo write documentation
*/
export default function EmptyStateWrapper({
Expand All @@ -55,12 +55,12 @@ export default function EmptyStateWrapper({
headingLevel = "h4",
noPadding = false,
children,
...props
...rest
}) {
if (noPadding) props.className = [props.className, 'no-padding'].join(" ").trim();
if (noPadding) rest.className = [rest.className, 'no-padding'].join(" ").trim();

return (
<EmptyState variant="lg" {...props}>
<EmptyState variant="lg" {...rest}>
<EmptyStateHeader
headingLevel={headingLevel}
titleText={title}
Expand Down
2 changes: 2 additions & 0 deletions web/src/components/layout/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ const PREDEFINED_SIZES = [
* @param {IconName} props.name - Name of the desired icon.
* @param {string} [props.className=""] - CSS classes.
* @param {IconSize} [props.size] - Size used for both, width and height.
* @param {string} [props.color] - Color for the icon, currently based on PF
* text utils
* It can be a CSS unit or one of PREDEFINED_SIZES.
* @param {object} [props.otherProps] Other props sent to SVG icon. Please, note
* that width and height will be overwritten by the size value if it was given.
Expand Down

0 comments on commit 7011ca0

Please sign in to comment.