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

[Task](ui): Restore Modal stories once migrated all components #520

Open
gjaskiewicz opened this issue Oct 15, 2024 · 0 comments
Open

[Task](ui): Restore Modal stories once migrated all components #520

gjaskiewicz opened this issue Oct 15, 2024 · 0 comments
Assignees
Labels
ui-components All tasks related to juno-ui-components library

Comments

@gjaskiewicz
Copy link
Contributor

Stories:

export const Login = {
  render: Template,
  args: {
    title: "Log In",
    initialFocus: "#username",
    children: (
      <>
        <FormRow>
          <TextInput label="Username" name="username" id="username" autoComplete="on" />
        </FormRow>
        <FormRow>
          <TextInput type="password" label="Password" name="password" id="password" />
        </FormRow>
        <FormRow>
          <Checkbox label="Remember Me" id="remember-me" />
        </FormRow>
      </>
    ),
    modalFooter: (
      <ModalFooter confirmButtonLabel="Log In" confirmButtonIcon="accountCircle" cancelButtonLabel="Never Mind" />
    ),
  }
}
export const TestSelectInModal = {
  render: Template,
  args: {
    title: "Modal with Select inside",
    size: "small",
    children: (
      <>
        <Select>
          <SelectOption value="1" label="Option 1" key="o-1" />
          <SelectOption value="2" label="Option 2" key="o-2" />
          <SelectOption value="3" label="Option 3" key="o-3" />
        </Select>
      </>
    ),
  }
}
export const TestComboBoxInModal = {
  render: Template,
  args: {
    title: "Modal with CombBox inside",
    size: "small",
    children: (
      <>
        <ComboBox>
          <ComboBoxOption value="Rhubarb" key="1">
            Rhubarb
          </ComboBoxOption>
          <ComboBoxOption value="Carrots" key="2">
            Carrots
          </ComboBoxOption>
          <ComboBoxOption value="Spinach" key="3">
            Spinach
          </ComboBoxOption>
          <ComboBoxOption value="Tomatoes" key="4">
            Tomatoes
          </ComboBoxOption>
        </ComboBox>
      </>
    ),
  }
}
export const ModalWithALargerForm = {
  render: Template,
  args: {
    title: "Register",
    initialFocus: "#firstname",
    cancelButtonLabel: "Cancel",
    confirmButtonLabel: "Register now",
    children: (
      <Form>
        <FormRow>
          <TextInput label="First Name" id="firstname" />
        </FormRow>
        <FormRow>
          <TextInput label="Last Name" id="lastname" />
        </FormRow>
        <FormRow>
          <TextInput label="Email" id="email" type="email" />
        </FormRow>
        <FormRow>
          <TextInput label="Password" id="password" type="password" />
        </FormRow>
        <FormRow>
          <TextInput label="Retype Password" id="retype-password" type="password" />
        </FormRow>
        <FormRow>
          <Select label="Role">
            <SelectOption>Private Person</SelectOption>
            <SelectOption>Small Business</SelectOption>
          </Select>
        </FormRow>
        <FormRow>
          <ComboBox label="Country">
            <ComboBoxOption value="germany" key="DE">
              Germany
            </ComboBoxOption>
            <ComboBoxOption value="uk" key="UK">
              United Kingdom
            </ComboBoxOption>
            <ComboBoxOption value="us" key="US">
              USA
            </ComboBoxOption>
          </ComboBox>
        </FormRow>
      </Form>
    ),
  }
}
@gjaskiewicz gjaskiewicz self-assigned this Oct 15, 2024
@barsukov barsukov added the ui-components All tasks related to juno-ui-components library label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui-components All tasks related to juno-ui-components library
Projects
None yet
Development

No branches or pull requests

2 participants