ReactMaterial master READ ONLY 0
  • explorer
  • search
a [App]
a CG.ReactMaterial
a README.md
a app.ts
a [Test]
a test
  • README.md

ReactMaterial

React components that implement Google's Material Design.

Integrated with Code.Gamelet.

Getting Started

Usage

Open a pre-defined dialog:

// Alert Dialog
CG.ReactMaterial.dialogs.openAlertDialog({
    title: 'Alert!!!',
    message: 'Something is happening.',
    onClose: () => {
        console.log('dialog is closed');
    };

// Confirm Dialog
CG.ReactMaterial.dialogs.openConfirmDialog({
    title: 'Delete File',
    message: 'Are you sure?',
    onConfirm: () => {
        console.log('user confirmed');
    };

// Input Dialog
CG.ReactMaterial.dialogs.openInputDialog({
    title: 'What\'s your name?',
    message: 'Your name will be shown in the highscore board.',
    onConfirm: (value: string) => {
        console.log('name = ' + value);
    };

To write your own React element:

CG.React.renderElement(
    <div>
        <materialUI.TextField
            id="name"
            label="Name"
            margin="normal"
            />

         <materialUI.Button variant="contained" color="primary" size="small" className={classes.button}>
            Send
            <materialUI.Icon>send</materialUI.Icon>
        </materialUI.Button>
    </div>
);

Versioning

We use SemVer for versioning.

Authors

Haskasu

READ ONLY
  • problem
  • console
No problems have been detected so far.
Ln 1, Col 1, Sel 0
Markdown