Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Use NoticeBannerProps for type of noticeProps
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Mar 10, 2023
1 parent 28df6f9 commit 3175eb3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useDispatch } from '@wordpress/data';
import { usePrevious } from '@woocommerce/base-hooks';
import { decodeEntities } from '@wordpress/html-entities';
import type { NoticeType } from '@woocommerce/types';
import type { NoticeBannerProps } from '@woocommerce/base-components/notice-banner';

/**
* Internal dependencies
Expand Down Expand Up @@ -120,7 +121,9 @@ const StoreNotices = ( {
decodeEntities( notice.content )
),
} ) );
const noticeProps = {
const noticeProps: Omit< NoticeBannerProps, 'children' > & {
key: string;
} = {
key: `store-notice-${ status }`,
status: 'error',
onRemove: () => {
Expand Down

0 comments on commit 3175eb3

Please sign in to comment.