Skip to main content

ReactPy wrapper for react-github-btn

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reactpy_github_buttons-0.0.14.tar.gz (967.6 kB view hashes)

Uploaded Source

Built Distribution

reactpy_github_buttons-0.0.14-py3-none-any.whl (973.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page