Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Functions

Const GitHubEmoji

  • GitHubEmoji(__namedParameters: { name: string }): Element
  • Parameters

    • __namedParameters: { name: string }
      • name: string

    Returns Element

Const RepoCard

  • RepoCard(__namedParameters: { Loading: Component; repository: string; username: string }): Element
  • Use this default export to get the GitHub repository card component.

    import React from "react";
    import RepoCard from "react-repo-card";
    
    export const App = () => (
      <>
        <h1>Check out my repositories!</h1>
        <RepoCard username="dawsonbooth" repository="ascii-art" />
      </>
    );

    Parameters

    • __namedParameters: { Loading: Component; repository: string; username: string }
      • Loading: Component
      • repository: string
      • username: string

    Returns Element

    React GitHub repository card component

Const useColors

  • useColors(): [object, boolean, boolean]
  • This is a hook for fetching the GitHub colors from ozh/github-colors.

    Returns [object, boolean, boolean]

    The content that is fetched, a loading boolean, and a hasError boolean

Const useEmojis

  • useEmojis(): [Endpoints["GET /emojis"]["response"], boolean, boolean]
  • This is a hook for fetching the emoji names from the official GitHub API.

    Returns [Endpoints["GET /emojis"]["response"], boolean, boolean]

    The content that is fetched, a loading boolean, and a hasError boolean

Const useFetch

  • useFetch(url: string): [any, boolean, boolean]
  • This is a utility hook for fetching miscellaneous content. The other hooks use this one to get content from GitHub.

    Parameters

    • url: string

    Returns [any, boolean, boolean]

    The content that is fetched, a loading boolean, and a hasError boolean

Const useGitHubRepo

  • useGitHubRepo(username: string, repository: string): [Endpoints["GET /repos/:owner/:repo"]["response"]["data"], boolean, boolean]
  • This is a hook for fetching the repository information from the official GitHub API.

    Parameters

    • username: string
    • repository: string

    Returns [Endpoints["GET /repos/:owner/:repo"]["response"]["data"], boolean, boolean]

    The content that is fetched, a loading boolean, and a hasError boolean

Generated using TypeDoc