@open-comp/gh
v0.1.0
Published
GitHub-scoped open components for the open-comp ecosystem
Readme
@open-comp/gh
GitHub-scoped React components for the open-comp ecosystem.
Installation
npm install @open-comp/ghComponents
GitHubProfile
Displays a GitHub user profile card.
import { GitHubProfile } from '@open-comp/gh'
<GitHubProfile
username="ElJijuna"
avatarUrl="https://avatars.githubusercontent.com/u/12345"
bio="Open source developer"
/>| Prop | Type | Required | Description |
|------|------|----------|-------------|
| username | string | yes | GitHub username (displayed as @username) |
| avatarUrl | string | no | URL of the avatar image |
| bio | string | no | Short bio text |
Consumption patterns
A — classic npm install
import { GitHubProfile } from '@open-comp/gh'B — via open-comp orchestrator (Module Federation)
import { Microfrontend } from 'open-comp'
<Microfrontend
url="https://unpkg.com/@open-comp/[email protected]/dist/remoteEntry.js"
remoteName="opencomp_gh"
expose="./GitHubProfile"
username="ElJijuna"
fallback={<span>Loading…</span>}
/>C — direct ESM from unpkg
const { GitHubProfile } = await import(
'https://unpkg.com/@open-comp/[email protected]/dist/index.es.js'
)Releases
Use the gh commit scope:
feat(gh): add repo card component # minor
fix(gh): fix avatar fallback # patch
feat(gh)!: rename username prop # major