Type alias: FireCMSPlugin<PROPS, FORM_PROPS>
Ƭ FireCMSPlugin<PROPS
, FORM_PROPS
>: Object
Interface used to define plugins for FireCMS. NOTE: This is a work in progress and the API is not stable yet.
Type parameters
Name | Type |
---|---|
PROPS | any |
FORM_PROPS | any |
Type declaration
Name | Type | Description |
---|---|---|
collections? | { CollectionActions? : React.ComponentType <CollectionActionsProps > | React.ComponentType <CollectionActionsProps >[] ; injectCollections? : (collections : EntityCollection []) => EntityCollection [] } | - |
collections.CollectionActions? | React.ComponentType <CollectionActionsProps > | React.ComponentType <CollectionActionsProps >[] | Use this component to add custom actions to the entity collections toolbar. |
collections.injectCollections? | (collections : EntityCollection []) => EntityCollection [] | Use this method to inject collections to the CMS. You receive the current collections as a parameter, and you can return a new list of collections. See joinCollectionLists |
form? | { Actions? : React.ComponentType <PluginFormActionProps > ; fieldBuilder? : <T>(props : PluginFieldBuilderParams <T >) => React.ComponentType <FieldProps <T >> | null ; fieldBuilderEnabled? : <T>(props : PluginFieldBuilderParams <T >) => boolean ; provider? : { Component : React.ComponentType <PropsWithChildren <FORM_PROPS & PluginFormActionProps <any >>> ; props? : FORM_PROPS } } | - |
form.Actions? | React.ComponentType <PluginFormActionProps > | - |
form.fieldBuilder? | <T>(props : PluginFieldBuilderParams <T >) => React.ComponentType <FieldProps <T >> | null | - |
form.fieldBuilderEnabled? | <T>(props : PluginFieldBuilderParams <T >) => boolean | - |
form.provider? | { Component : React.ComponentType <PropsWithChildren <FORM_PROPS & PluginFormActionProps <any >>> ; props? : FORM_PROPS } | - |
form.provider.Component | React.ComponentType <PropsWithChildren <FORM_PROPS & PluginFormActionProps <any >>> | - |
form.provider.props? | FORM_PROPS | - |
homePage? | { AdditionalCards? : React.ComponentType <PluginHomePageAdditionalCardsProps > | React.ComponentType <PluginHomePageAdditionalCardsProps >[] ; CollectionActions? : React.ComponentType <PluginHomePageActionsProps > ; extraProps? : any ; includeSection? : (props : PluginGenericProps ) => { children : React.ReactNode ; title : string } } | - |
homePage.AdditionalCards? | React.ComponentType <PluginHomePageAdditionalCardsProps > | React.ComponentType <PluginHomePageAdditionalCardsProps >[] | Add additional cards to each collection group in the home page. |
homePage.CollectionActions? | React.ComponentType <PluginHomePageActionsProps > | Use this component to add custom actions to the navigation card in the home page. |
homePage.extraProps? | any | Additional props passed to CollectionActions |
homePage.includeSection? | (props : PluginGenericProps ) => { children : React.ReactNode ; title : string } | Include a section in the home page with a custom component and title. |
loading? | boolean | If this flag is set to true, no content will be shown in the CMS until the plugin is fully loaded. |
name | string | Name of the plugin |
provider? | { Component : React.ComponentType <PropsWithChildren <PROPS & { context : FireCMSContext }>> ; props? : PROPS } | You can use this prop to add higher order components to the CMS. The components will be added to the root of the CMS, so any component rendered underneath by this plugin will have access to the context provided by this HOC. Anyhow, this is rendered below the FireCMSContext provider, so you can use the hooks provided by the CMS. Param |
provider.Component | React.ComponentType <PropsWithChildren <PROPS & { context : FireCMSContext }>> | - |
provider.props? | PROPS | - |