Skip to content

stevej2608/reactpy-github-buttons

Repository files navigation

reactpy-github-buttons

Minimal ReactPy wrapper for github-buttons.

Usage

pip install reactpy-github-buttons

Examples

Several examples of usage are in the ./examples folder.

Minimal

./examples/single.py

from reactpy import component, html, run
from reactpy_github_buttons import StarButton

@component
def AppMain():
    return StarButton(user='reactive-python', repo='reactpy')

if __name__ == "__main__":
    run(AppMain)

With Color Scheme

./examples/color_scheme.py

from reactpy import component, html, run
from reactpy_github_buttons import StarButton, make_color_scheme, ColorScheme

@component
def AppMain():
    return StarButton(user='reactive-python', repo='reactpy',
        show_count=True,
        color_scheme=make_color_scheme(
            no_preference=ColorScheme.LIGHT_HIGH_CONTRAST,
            light=ColorScheme.LIGHT,
            dark=ColorScheme.DARK_HIGH_CONTRAST,
        )
    )

if __name__ == "__main__":
    run(AppMain)

Buttons Playground

The Buttons Playground application has been implemented as a RectPy demonstrator.

python -m examples.button_playground

About

ReactPy wrapper for github-buttons

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy