frontity
Version:
Frontity cli and entry point to other packages
27 lines (26 loc) • 840 B
TypeScript
import * as React from "react";
import { Fill as StateFill } from "../../../types";
/**
* The fill items returned by the useFills hooks. They contain the same
* information as {@link StateFill} plus the final React component and a key
* to iterate over the array.
*/
interface Fill extends StateFill {
/**
* The React component that needs to be injected in the Slot for this fill.
*/
Fill: React.ElementType;
/**
* A unique key that can be used when iterating over the array in React.
*/
key: string;
}
/**
* A React hook to ease the creation of `Slot` components.
*
* @param name - The name of the Slot that you want to fill.
*
* @returns Array of fill objects that you can use to inject in the slot for this name.
*/
declare const useFills: (name: string) => Fill[];
export default useFills;