GithubHelp home page GithubHelp logo

reactpy-material's Introduction

reactpy-material

This project provide Material UI components to be used in reactpy projects. For a deep understanding of the components and its properties check the Material UI Docs.

Available components

Layout

Inputs

Data display

Navigation

Samples

Button

Reference

from reactpy import component
from reactpy_material import button

@component
def app()
    return ( 
        button(
            "Hello world", 
            attrs={
                "variant": "contained", 
                "href": "#test"
            }
        )
    )

Typography

Reference

@component
def app():
    return html.div(
        typography(
            "h1. Heading",
            attrs={
                "variant": "h1"
            }
        )
    )

run(app)

Check the samples/ folder to see more samples of the available components.

reactpy-material's People

Contributors

williamneto avatar marceloakira avatar archmonger avatar

Stargazers

 avatar Yang大侠 avatar only avatar Arnav Das avatar Ed Saleh avatar Cong Vo avatar  avatar Yan Lu 路晏 avatar Viran Weerasekera avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

reactpy-material's Issues

bug: component box with a child component box doesn't render

Description

  • A component returning a box with a child component returning another box doesn't render

Version

  • pre v.0.0.1

Steps to Reproduce

  1. Create two components:
from reactpy import component, run, html
from reactpy_material import box


@component  # @componet is removed: OK
def hello_box():
    return box(
    # return html.div(   # OK if s/box/html.div/
        html.h1(
            {"key": "title1"},
            "Hello World"
        ),
        key="hello box"
    )


@component
def hello_box_inside_box():
    return box(
        hello_box(),
        key="external box"
    )


run(hello_box_inside_box)
# run(hello_box) # running child component - OK
  1. Run the code and inspect in the browser and nothing is rendered, resulting in a blank page.
  2. Inspect the web page and find the error: "Uncaught DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('') is not a valid name."
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.