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

Radio buttons for modal #91

Merged
merged 8 commits into from
Nov 22, 2019
Merged

Radio buttons for modal #91

merged 8 commits into from
Nov 22, 2019

Conversation

yhatt
Copy link
Owner

@yhatt yhatt commented Nov 22, 2019

Now <RadioButtonGroup> / <RadioButton> can use in <Modal> container! jsx-slack will no longer throw an error even if using <RadioButtonGroup> in modal.

<Modal title="Radio buttons for modal">
  <Actions>
    <RadioButtonGroup>
      <RadioButton value="a" description="Option A">A</RadioButton>
      <RadioButton value="b" description="Option B">B</RadioButton>
      <RadioButton value="c" description="Option C">C</RadioButton>
    </RadioButtonGroup>
  </Actions>

  <Section>
    Radio button group as <i>an accessory of &lt;Section&gt;</i>
    <RadioButtonGroup>
      <RadioButton value="a" description="Option A">A</RadioButton>
      <RadioButton value="b" description="Option B">B</RadioButton>
      <RadioButton value="c" description="Option C">C</RadioButton>
    </RadioButtonGroup>
  </Section>

  <Input label="Radio buttons in &lt;Input&gt;" name="input-block">
    <RadioButtonGroup>
      <RadioButton value="a" description="Option A">A</RadioButton>
      <RadioButton value="b" description="Option B">B</RadioButton>
      <RadioButton value="c" description="Option C">C</RadioButton>
    </RadioButtonGroup>
  </Input>

  <RadioButtonGroup label="Radio button group as input component" name="input-component">
    <RadioButton value="a" description="Option A">A</RadioButton>
    <RadioButton value="b" description="Option B">B</RadioButton>
    <RadioButton value="c" description="Option C">C</RadioButton>
  </RadioButtonGroup>
</Modal>

We've added a interface for input component too. User can migrate easily from <Select> / <Option> with just replacing component.

Resolves #88.

ToDo

  • Allow using <RadioButtonGroup> in modal
  • Add interface as an input component
  • Fix existing tests
  • Update documentation

@yhatt yhatt merged commit e5dc6dd into master Nov 22, 2019
@yhatt yhatt deleted the radio-buttons-for-modal branch November 22, 2019 04:05
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.

Radio buttons for <Modal>
1 participant