yhatt / jsx-slack

Build JSON object for Slack Block Kit surfaces from JSX
https://jsx-slack.netlify.app/
MIT License
467 stars 16 forks source link

Add `<Input>` type variants `url`, `email`, and `number` #279

Closed yhatt closed 2 years ago

yhatt commented 2 years ago

Extend type prop variants for <Input> component, to support URL input, email input, and number input. Slack app can provide proper input elements for purpose.

<Modal title="Input variants">
  <Input type="text" label="Text" />
  <Input type="url" label="URL" />
  <Input type="email" label="Email" />
  <Input type="number" label="Number" min={0} max={1000} />
</Modal>

Input variants

This interface is very similar to jsx-slack v0's (outdated) dialog support. https://github.com/yhatt/jsx-slack/blob/v0.11.0/docs/jsx-components-for-dialog.md#html5-types

Close #277.

ToDo