Skip to content
Snippets Groups Projects
index.d.ts 3.37 KiB
Newer Older
declare module "*";

tovo's avatar
tovo committed
import { IGatsbyImageData } from "gatsby-plugin-image";

tovo's avatar
tovo committed

interface LayoutProps {
  children: React.ReactNode;
  UserMenu?: React.ReactNode;
}

/**
 * Default Layout with Header (Helmet & SEO) and Footer
 * @param {LayoutProps} props - Page content
 * @returns {JSX.Element} The complete page
 */
export function Layout(props: LayoutProps): JSX.Element;

interface ContentProps {
  children: React.ReactNode;
  className?: string;
}

/**
 * Centered section for page content
 * @param {ContentProps} props - Section content
 * @returns {JSX.Element} The complete section
 */
export function Content(props: ContentProps): JSX.Element;

interface ButtonProps {
  children?: React.ReactNode;
  title?: string;
  to?: string;
  className?: string;
}
Julien MARGAIL's avatar
Julien MARGAIL committed
export function Button(props: ButtonProps): JSX.Element;
interface CardProps {
  title?: string;
  content?: string;
tovo's avatar
tovo committed
  image?: string;
  to?: string;
  anime?: boolean;
  layout?: "top" | "left";
  className?: string;
}
export function Card(props: CardProps): JSX.Element;

Toavina's avatar
Toavina committed
interface BadgeProps {
  children?: React.ReactNode;
  title?: string;
Toavina's avatar
Toavina committed
  className?: string;
}
export function Badge(props: BadgeProps): JSX.Element;

interface TocProps {
  children?: React.ReactNode;
  className?: string;
}
export function Toc(props: TocProps): JSX.Element;

Tojo's avatar
Tojo committed
interface Iheader {
	className?: string
	logo?: any
}
Tojo's avatar
GC  
Tojo committed
export function Header(props: Iheader): JSX.Element;

interface LinkProps {
  children?: React.ReactNode;
  to: string;
  activeClassName?: string;
  partiallyActive?: string;
export function Link(props: LinkProps): JSX.Element;

Tojo's avatar
Tojo committed
interface DataImage {
  src: string;
}
interface Image {
  images: Array<DataImage>;
  isLogo: boolean;
  delay?: number;
}
export function Carousel(props: Image): JSX.Element;

interface SearchProps {}
export function Search(props: SearchProps): JSX.Element;
Tojo's avatar
Tojo committed
interface IMenu {}
export function Menu(props: IMenu): JSX.Element;

Tojo's avatar
Tojo committed
interface IMenuMobile {}
export function MenuMobile(props: IMenu): JSX.Element;

Tojo's avatar
Tojo committed
interface Ilogo {
  to?: string;
  className?: string;
  src?: string;
  title: string;
  image: any
}
export function Logo(props:Ilogo): JSX.Element;

interface Service {
  title: string;
  subtitle: string;
  icon: string;
}
interface Action {
  title: string;
  to: string;
}
interface HeroProps {
  title?: string;
  subtitle?: string;
  description?: string;
  action: Action;
  services?: Array<Service>;
}
/**
 * Hero section with background image and buttons action
 * @param {HeroProps} props - Section content
 * @returns {JSX.Element} The complete section
 */
export function Hero(props: HeroProps): JSX.Element;

tovo's avatar
tovo committed
interface MapProps {
  idMap: number;
}
export function Map(props: MapProps): JSX.Element;

tovo's avatar
tovo committed
interface FeatureProps {
  title?: string;
  content?: string;
  image?: string | IGatsbyImageData;
  idMap?: number;
  layout?: 'left' | 'right';
  backgroundImage?: string;
  action?: {
tovo's avatar
tovo committed
    title?: string;
    to?: string;
    className?: string;
tovo's avatar
tovo committed
  };
  custom?: JSX.Element;
}
export function Feature(props: FeatureProps): JSX.Element;
tovo's avatar
tovo committed
interface ImageProps {
  image?: string | IGatsbyImageData;
  classname?: string;
}
export function Image(props: ImageProps): JSX.Element;
Tojo's avatar
Tojo committed
interface CardListProps {
  cards?: CardProps[];
  layout?: 'row' | 'col' | 'grid';
  className?: string;
tovo's avatar
tovo committed
  anime?: boolean;
Tojo's avatar
Tojo committed
}
export function CardList(props: CardListProps): JSX.Element;
tovo's avatar
tovo committed

declare module "@onegeo/gatsby-theme-onegeo";