mirror of
https://github.com/kusti8/proton-native.git
synced 2026-05-15 14:15:50 -06:00
1.2 KiB
1.2 KiB
Form
A container where there is a label on the left and a component on the right.
Each form component has a single prop, label which sets the label to its left. It is required.
import React, { Component } from 'react';
import { render, Window, App, Form, TextInput } from 'proton-native';
class Example extends Component {
render() {
return (
<App>
<Window title="Example" size={{ w: 500, h: 500 }}>
<Form>
<TextInput label="Username" />
<TextInput label="Password" secure={true} />
</Form>
</Window>
</App>
);
}
}
render(<Example />);
Props
Reference
enabled
Whether the Form is enabled.
| Type | Required | Default |
|---|---|---|
| bool | No | true |
visible
Whether the Form can be seen.
| Type | Required | Default |
|---|---|---|
| bool | No | true |
padded
Whether there is padding between the components
| Type | Required | Default |
|---|---|---|
| bool | No | false |