@hydrofoil/alcaeus-forms

0.1.1 • Public • Published

@hydrofoil/alcaeus-form

Automatically render forms for Hydra-driven operations

Build Status BrowserStack Status codecov

Installation

npm i --save @hydrofoil/alcaeus-forms

Usage

Here's an example showing how form is used with lit-html

import { Hydra } from 'alcaeus'
import { html } from 'lit-html'
import '@hydrofoil/alcaeus-forms/alcaeus-form'

const resource = (await Hydra.loadResource('http://hydra-movies.herokuapp.com/')).root
const collection = resource.getCollections()[0]
resource.operations.find(op => op.method === 'POST')

const form = html`<alcaeus-form .operation="${operation}"></alcaeus-form>` 

Package Sidebar

Install

npm i @hydrofoil/alcaeus-forms

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

15.8 kB

Total Files

13

Last publish

Collaborators

  • tpluscode