Skip to content

Instantly share code, notes, and snippets.

@caasi
Last active May 26, 2020 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caasi/02ac338f05e58a2ca8293eff2791e13a to your computer and use it in GitHub Desktop.
Save caasi/02ac338f05e58a2ca8293eff2791e13a to your computer and use it in GitHub Desktop.
import React, { FC } from 'react';
import * as Inter from 'interaction';
export default const Foo: FC<Inter.ListProps<[string, number, string]>> = ({ value, onChange }) => {
return (
<Inter.List value={value} onChange={onChange}>
<Inter.Text />
<p>foobar</p>
<Inter.Number />
<Inter.Text />
<div>lol</div>
</Inter.List>
);
};
import React, { FC } from 'react';
import * as Inter from 'interaction';
export default const Foo: FC<Inter.MapProps<{ foo: string, bar: number }>> = ({ value, onChange }) => {
return (
<Inter.Map value={value} onChange={onChange}>
<Inter.Number name="bar" />
<Inter.Text name="foo" />
</Inter.Map>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment