Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <Input> layout block and block element #61

Merged
merged 12 commits into from
Sep 30, 2019
Merged

Add <Input> layout block and block element #61

merged 12 commits into from
Sep 30, 2019

Conversation

yhatt
Copy link
Owner

@yhatt yhatt commented Sep 28, 2019

This PR has implemented a part of #57.

jsx-slack will provide <Input> component for 2 usages. A one is for layout block as same as an original spec in Slack API, and the other is focusing to the compatibility with HTML as like as existing <Input> component for Dialog support.

<Input> layout block

<Input> layout block should contain one of available elements such as <Select>.

<Modal title="My App">
  <Input label="User" hint="Please select one of users." required>
    <UsersSelect placeholder="Choose user..." />
  </Input>
</Modal>

<Input> block element

For compatibility of HTML, we adopted to use <Input> component as an element instead of providing <PlainTextInput> element component.

<Modal title="My App">
  <Input label="Title" name="title" maxLength={80} required />
</Modal>

At the moment, multiline prop is not implemented in <Input>. It would be provided in another component like <Textarea>.

@yhatt yhatt changed the title Add <Input> block with usage based on Slack API Add <Input> layout block and block element Sep 30, 2019
@yhatt yhatt marked this pull request as ready for review September 30, 2019 08:05
@yhatt yhatt merged commit cd7c023 into master Sep 30, 2019
@yhatt yhatt deleted the input-block branch September 30, 2019 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant