Browse Source
Component that wraps Informed.Form as a Styled System component.renovate/lint-staged-8.x
4 changed files with 32 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||
import system from '@rebass/components' |
|||
import { styles } from 'styled-system' |
|||
import { Form as InformedForm } from 'informed' |
|||
// Create an html input element that accepts all style props from styled-system.
|
|||
const Form = system( |
|||
{ |
|||
extend: InformedForm |
|||
}, |
|||
...Object.keys(styles) |
|||
) |
|||
|
|||
export default Form |
@ -0,0 +1,10 @@ |
|||
import React from 'react' |
|||
import renderer from 'react-test-renderer' |
|||
import { Form } from 'components/UI' |
|||
|
|||
describe('component.UI.Form', () => { |
|||
it('should render correctly', () => { |
|||
const tree = renderer.create(<Form />).toJSON() |
|||
expect(tree).toMatchSnapshot() |
|||
}) |
|||
}) |
@ -0,0 +1,9 @@ |
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP |
|||
|
|||
exports[`component.UI.Form should render correctly 1`] = ` |
|||
<form |
|||
className="" |
|||
onReset={[Function]} |
|||
onSubmit={[Function]} |
|||
/> |
|||
`; |
Loading…
Reference in new issue