1.0.1 • Published 1 year ago

@jmondi/github-ui v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

@jmondi/github-ui

A React component library for displaying GitHub contributors and sponsors with a modern UI.

Features

  • Display GitHub repository contributors
  • Show GitHub sponsors for a user
  • Responsive and customizable UI
  • Built with React and Tailwind CSS
  • Efficient data fetching with SWR

Installation

npm install @jmondi/github-ui
# or
yarn add @jmondi/github-ui
# or
pnpm add @jmondi/github-ui

Usage

Contributors Component

import { Contributors } from '@jmondi/github-ui/contributors';
import '@jmondi/github-ui/style.css';

function MyComponent() {
  return (
    <Contributors
      owner="facebook"
      repo="react"
      refreshInterval={3600000} // Optional: 1 hour in milliseconds
    />
  );
}

Sponsors Component

import { Sponsors } from '@jmondi/github-ui/sponsors';
import '@jmondi/github-ui/style.css';

function MyComponent() {
  return (
    <Sponsors
      username="octocat"
      refreshInterval={3600000} // Optional: 1 hour in milliseconds
    />
  );
}

API

Contributors Props

PropTypeDefaultDescription
ownerstring-GitHub repository owner
repostring-GitHub repository name
refreshIntervalnumber3600000Data refresh interval in milliseconds

Sponsors Props

PropTypeDefaultDescription
usernamestring-GitHub username
refreshIntervalnumber3600000Data refresh interval in milliseconds

Development

  1. Clone the repository
  2. Install dependencies: pnpm install
  3. Build the project: pnpm build
  4. Format code: pnpm format

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Would you like me to explain or elaborate on any part of this README?

1.0.1

1 year ago

1.0.0

1 year ago

0.2.8

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago