0.1.1 • Published 6 years ago

@hydrofoil/alcaeus-forms v0.1.1

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

@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>` 
0.1.1

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago