File tree Expand file tree Collapse file tree
types/wordpress__edit-post Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Dashicon } from "@wordpress/components" ;
2- import { ComponentType , JSX , MouseEventHandler } from "react" ;
2+ import { ComponentProps , ComponentType , JSX , MouseEventHandler } from "react" ;
33
44declare namespace PluginBlockSettingsMenuItem {
55 interface Props {
@@ -13,7 +13,7 @@ declare namespace PluginBlockSettingsMenuItem {
1313 * A dashicon slug, or a custom JSX element.
1414 * @defaultValue `"admin-plugins"`
1515 */
16- icon ?: JSX . Element | Dashicon . Icon | undefined ;
16+ icon ?: JSX . Element | ComponentProps < typeof Dashicon > [ "icon" ] | undefined ;
1717 /**
1818 * The menu item text.
1919 */
Original file line number Diff line number Diff line change 11import { Dashicon , MenuItem } from "@wordpress/components" ;
2- import { ComponentType , JSX , ReactNode } from "react" ;
2+ import { ComponentProps , ComponentType , JSX , ReactNode } from "react" ;
33
44declare namespace PluginMoreMenuItem {
5- interface Props extends Omit < MenuItem . Props , "href" > {
5+ interface Props extends Omit < ComponentProps < typeof MenuItem > , "href" | "icon "> {
66 children : ReactNode ;
77 /**
88 * When `href` is provided then the menu item is represented as an anchor rather than
@@ -13,7 +13,7 @@ declare namespace PluginMoreMenuItem {
1313 * A Dashicon slug or a custom JSX element to be rendered to the left of the menu item
1414 * label.
1515 */
16- icon ?: Dashicon . Icon | JSX . Element | undefined ;
16+ icon ?: ComponentProps < typeof Dashicon > [ "icon" ] | JSX . Element | undefined ;
1717 /**
1818 * The callback function to be executed when the user clicks the menu item.
1919 */
Original file line number Diff line number Diff line change 11import { Dashicon } from "@wordpress/components" ;
2- import { ComponentType , JSX , ReactNode } from "react" ;
2+ import { ComponentProps , ComponentType , JSX , ReactNode } from "react" ;
33
44declare namespace PluginSidebarMoreMenuItem {
55 interface Props {
@@ -13,7 +13,7 @@ declare namespace PluginSidebarMoreMenuItem {
1313 * A Dashicon slug or a custom JSX element to be rendered to the left of the menu item
1414 * label.
1515 */
16- icon ?: Dashicon . Icon | JSX . Element | undefined ;
16+ icon ?: ComponentProps < typeof Dashicon > [ "icon" ] | JSX . Element | undefined ;
1717 }
1818}
1919
Original file line number Diff line number Diff line change 11import { Dashicon , Slot } from "@wordpress/components" ;
2- import { FC , JSX , ReactNode } from "react" ;
2+ import { ComponentProps , FC , JSX , ReactNode } from "react" ;
33
44declare namespace PluginDocumentSettingPanel {
55 interface Props {
@@ -20,7 +20,7 @@ declare namespace PluginDocumentSettingPanel {
2020 * A Dashicon slug or a custom JSX element to be rendered when the sidebar is pinned to
2121 * toolbar.
2222 */
23- icon ?: Dashicon . Icon | JSX . Element | undefined ;
23+ icon ?: ComponentProps < typeof Dashicon > [ "icon" ] | JSX . Element | undefined ;
2424 }
2525}
2626
@@ -43,7 +43,7 @@ declare namespace PluginDocumentSettingPanel {
4343 */
4444declare const PluginDocumentSettingPanel : {
4545 ( props : PluginDocumentSettingPanel . Props ) : JSX . Element ;
46- Slot : FC < Omit < Slot . Props , "name" > > ;
46+ Slot : FC < Omit < ComponentProps < typeof Slot > , "name" > > ;
4747} ;
4848
4949export default PluginDocumentSettingPanel ;
Original file line number Diff line number Diff line change 11import { Slot } from "@wordpress/components" ;
2- import { FC , JSX , ReactNode } from "react" ;
2+ import { ComponentProps , FC , JSX , ReactNode } from "react" ;
33
44declare namespace PluginPostPublishPanel {
55 interface Props {
@@ -42,7 +42,7 @@ declare namespace PluginPostPublishPanel {
4242 */
4343declare const PluginPostPublishPanel : {
4444 ( props : PluginPostPublishPanel . Props ) : JSX . Element ;
45- Slot : FC < Omit < Slot . Props , "name" > > ;
45+ Slot : FC < Omit < ComponentProps < typeof Slot > , "name" > > ;
4646} ;
4747
4848export default PluginPostPublishPanel ;
Original file line number Diff line number Diff line change 11import { Slot } from "@wordpress/components" ;
2- import { FC , JSX , ReactNode } from "react" ;
2+ import { ComponentProps , FC , JSX , ReactNode } from "react" ;
33
44declare namespace PluginPostStatusInfo {
55 interface Props {
@@ -29,7 +29,7 @@ declare namespace PluginPostStatusInfo {
2929 */
3030declare const PluginPostStatusInfo : {
3131 ( props : PluginPostStatusInfo . Props ) : JSX . Element ;
32- Slot : FC < Omit < Slot . Props , "name" > > ;
32+ Slot : FC < Omit < ComponentProps < typeof Slot > , "name" > > ;
3333} ;
3434
3535export default PluginPostStatusInfo ;
Original file line number Diff line number Diff line change 11import { Slot } from "@wordpress/components" ;
2- import { FC , JSX , ReactNode } from "react" ;
2+ import { ComponentProps , FC , JSX , ReactNode } from "react" ;
33
44declare namespace PluginPrePublishPanel {
55 interface Props {
@@ -42,7 +42,7 @@ declare namespace PluginPrePublishPanel {
4242 */
4343declare const PluginPrePublishPanel : {
4444 ( props : PluginPrePublishPanel . Props ) : JSX . Element ;
45- Slot : FC < Omit < Slot . Props , "name" > > ;
45+ Slot : FC < Omit < ComponentProps < typeof Slot > , "name" > > ;
4646} ;
4747
4848export default PluginPrePublishPanel ;
Original file line number Diff line number Diff line change 11import { Dashicon } from "@wordpress/components" ;
2- import { ComponentType , JSX , ReactNode } from "react" ;
2+ import { ComponentProps , ComponentType , JSX , ReactNode } from "react" ;
33
44declare namespace PluginSidebar {
55 interface Props {
@@ -12,7 +12,7 @@ declare namespace PluginSidebar {
1212 * A Dashicon slug or a custom JSX element to be rendered when the sidebar is pinned to
1313 * toolbar.
1414 */
15- icon ?: Dashicon . Icon | JSX . Element | undefined ;
15+ icon ?: ComponentProps < typeof Dashicon > [ "icon" ] | JSX . Element | undefined ;
1616 /**
1717 * Whether to allow to pin sidebar to toolbar.
1818 * @defaultValue `true`
Original file line number Diff line number Diff line change 77 ],
88 "dependencies" : {
99 "@types/react" : " *" ,
10- "@types/wordpress__components " : " * " ,
10+ "@wordpress/components " : " ^27.3.0 " ,
1111 "@wordpress/data" : " ^9.13.0" ,
1212 "@wordpress/element" : " ^5.0.0"
1313 },
You can’t perform that action at this time.
0 commit comments