How to use the @hyperapp/html.button function in @hyperapp/html

To help you get started, we’ve selected a few @hyperapp/html examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jc21 / docker-registry-ui / src / frontend / js / routes / image.js View on Github external
div({class: 'modal-content'}, [
                    div({class: 'modal-header text-left'},
                        h4({class: 'modal-title'}, 'Confirm Delete')
                    ),
                    div({class: 'modal-body'},
                        p('Are you sure you want to delete this image and tag' + (image.data.tags.length === 1 ? '' : 's') + '?')
                    ),
                    div({class: 'modal-footer'}, [
                        button({
                            class:           'btn btn-danger',
                            type:            'button',
                            onclick:         actions.deleteImageClicked,
                            'data-image_id': image_id,
                            'data-digest':   digest
                        }, 'Yes I\'m sure'),
                        button({class: 'btn btn-default', type: 'button', 'data-dismiss': 'modal'}, 'Cancel')
                    ])
                ])
            ),
            // onclose function
            function () {
                actions.updateState({confirmDeleteImage: null});
            }) : null
    );
}
github jc21 / docker-registry-ui / src / frontend / js / routes / image.js View on Github external
Nav(state.status.config.REGISTRY_STORAGE_DELETE_ENABLED),
        div({class: 'my-3 my-md-5'},
            div({class: 'container'}, view)
        ),
        // Delete modal
        append_delete_model ? Modal(
            div({class: 'modal-dialog'},
                div({class: 'modal-content'}, [
                    div({class: 'modal-header text-left'},
                        h4({class: 'modal-title'}, 'Confirm Delete')
                    ),
                    div({class: 'modal-body'},
                        p('Are you sure you want to delete this image and tag' + (image.data.tags.length === 1 ? '' : 's') + '?')
                    ),
                    div({class: 'modal-footer'}, [
                        button({
                            class:           'btn btn-danger',
                            type:            'button',
                            onclick:         actions.deleteImageClicked,
                            'data-image_id': image_id,
                            'data-digest':   digest
                        }, 'Yes I\'m sure'),
                        button({class: 'btn btn-default', type: 'button', 'data-dismiss': 'modal'}, 'Cancel')
                    ])
                ])
            ),
            // onclose function
            function () {
                actions.updateState({confirmDeleteImage: null});
            }) : null
    );
}
github lukejacksonn / hyperapp-electron / src / index.js View on Github external
const view = (state, actions) =>
  main([
    h1(state.count),
    div([
      button({ onclick: e => actions.sum(-1) }, 'Sub'),
      button({ onclick: e => actions.reset() }, 'Reset'),
      button({ onclick: e => actions.sum(1) }, 'Add'),
    ]),
  ])
github lukejacksonn / hyperapp-electron / src / index.js View on Github external
const view = (state, actions) =>
  main([
    h1(state.count),
    div([
      button({ onclick: e => actions.sum(-1) }, 'Sub'),
      button({ onclick: e => actions.reset() }, 'Reset'),
      button({ onclick: e => actions.sum(1) }, 'Add'),
    ]),
  ])
github lukejacksonn / hyperapp-electron / src / index.js View on Github external
const view = (state, actions) =>
  main([
    h1(state.count),
    div([
      button({ onclick: e => actions.sum(-1) }, 'Sub'),
      button({ onclick: e => actions.reset() }, 'Reset'),
      button({ onclick: e => actions.sum(1) }, 'Add'),
    ]),
  ])