3.1.0 • Published 6 years ago

sd-material-ui v3.1.0

Weekly downloads
274
License
MIT
Repository
github
Last release
6 years ago

sd-material-ui

StratoDem Analytics Dash implementation of material-ui components.

Dash wrappers around the excellent material-ui package

Installation and usage

$ pip install sd-material-ui
import dash
import dash_html_components as html

import sd_material_ui

my_app = dash.Dash()

# A FlatButton on Paper
my_app.layout = sd_material_ui.Paper([
    html.Div(children=[
        html.P(id='output', children=['n_clicks value: . n_clicks_previous value: '])
    ]),
    
    sd_material_ui.FlatButton(id='input', label='Click me', backgroundColor='orange'),
])

# Callback for FlatButton
@app.callback(
    dash.dependencies.Output('output', 'children'),
    [dash.dependencies.Input('input', 'n_clicks')],
    [dash.dependencies.State('input', 'n_clicks_previous')])
def display_clicks_flat(n_clicks_flat: int, n_clicks_flat_prev: int):
    if n_clicks_flat:
        return ['n_clicks value: {}. n_clicks_prev value: {}'.format(n_clicks_flat,
                                                                     n_clicks_flat_prev)]
    else:
return ['n_clicks value: ']

if __name__ == '__main__':
    my_app.run_server()

Material-UI components ported to Dash

Examples

sd-material-ui examples

Dash

Go to this link to learn about Dash.

Dash help

See the dash-components-archetype repo for more information.

Contributing

To set up the development environment:

$ npm install
# Run webpack to create the Dash React bundle
$ npm run build-dist
# Set up a virtualenv
$ virtualenv venv -p python3
$ source venv/bin/activate
# Install the local Python Dash package
$ npm run install-local

Running a local server

Run usage.py in the virtual environment

$ source venv/bin/activate
$ python usage.py

Contributors

@mjclawar @coralvanda @SreejaKeesara

3.1.0

6 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.17.0

7 years ago

2.16.4

7 years ago

2.16.3

7 years ago

2.16.2

7 years ago

2.16.1

7 years ago

2.16.0

7 years ago

2.15.0

7 years ago

2.14.1

7 years ago

2.14.0

7 years ago

2.13.4

7 years ago

2.13.3

7 years ago

2.13.2

7 years ago

2.13.1

7 years ago

2.13.0

7 years ago

2.12.0

7 years ago

2.11.1

7 years ago

2.10.1

7 years ago

2.10.0

7 years ago

2.9.0

7 years ago

2.8.0

7 years ago

2.7.1

7 years ago

2.7.0

7 years ago

2.6.1

7 years ago

2.5.0

7 years ago

2.4.0

7 years ago

2.3.1

7 years ago

2.3.0

7 years ago

2.2.0

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.7.5

7 years ago

1.7.4

7 years ago

1.7.3

7 years ago

1.7.2

7 years ago

1.7.1

7 years ago

1.7.0

7 years ago

1.6.1

7 years ago

1.6.0

8 years ago

1.5.1

8 years ago

1.5.0

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago