Skip to content

Commit

Permalink
Fix - Dropdown - Removing docs and storybook examples of the Dropdown…
Browse files Browse the repository at this point in the history
… form (#1148)
  • Loading branch information
chris-cedrone-cengage authored Oct 20, 2023
1 parent fadc143 commit f14ff08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 77 deletions.
5 changes: 5 additions & 0 deletions .changeset/fix-dropdownDocsStorybook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'react-magma-docs': patch
---

fix(Dropdown): Removing Dropdown password examples from docs and Storybook in lieu of future fix to UI bug pertaining to the show / hide button.
Original file line number Diff line number Diff line change
Expand Up @@ -320,33 +320,6 @@ const LinkMenuTemplate: Story<DropdownProps> = args => (
export const LinkMenu = LinkMenuTemplate.bind({});
LinkMenu.args = { ...Default.args };

const FormTemplate: Story<DropdownProps> = args => (
<div style={{ margin: '150px auto', textAlign: 'center' }}>
<Dropdown {...args}>
<DropdownButton>Dropdown with form</DropdownButton>
<DropdownContent>
<form style={{ margin: 0, padding: '16px' }}>
<Input labelText="Email Address" />
<PasswordInput labelText="Password" />
<Checkbox labelText="Remember me" />
<div style={{ textAlign: 'center' }}>
<p>
By signing in, you agree to our <a href="#terms">Terms of use</a>.
</p>
<Button isFullWidth>Sign In</Button>
<p>
<a href="#password">Forgot password?</a>
</p>
</div>
</form>
</DropdownContent>
</Dropdown>
</div>
);

export const Form = FormTemplate.bind({});
Form.args = { ...Default.args };

export const Inverse = HeaderIconTemplate.bind({});
Inverse.args = {
...Default.args,
Expand Down
50 changes: 0 additions & 50 deletions website/react-magma-docs/src/pages/api/dropdown.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -648,56 +648,6 @@ Dropdowns can contain elements other than `DropdownMenuItem` components. They ca
While users may navigate between `DropdownMenuItem` components using up and down arrow keys,
browser default keyboard behavior applies to other content.

### Dropdown with Form

```tsx
import React from 'react';
import {
Button,
Dropdown,
DropdownButton,
DropdownContent,
DropdownDivider,
Input,
InputType,
magma,
PasswordInput,
} from 'react-magma-dom';

export function Example() {
return (
<Dropdown width="300px">
<DropdownButton>Dropdown with Login Form</DropdownButton>
<DropdownContent>
<form style={{ margin: 0, padding: magma.spaceScale.spacing05 }}>
<Input type={InputType.email} labelText="Email Address" />
<PasswordInput labelText="Password" />
<div style={{ textAlign: 'center' }}>
<p>
By signing in, you agree to our <a href="#">Terms of use</a>.
</p>
<Button isFullWidth>Sign In</Button>
<p>
<a>Forgot password?</a>
</p>
</div>
</form>
<DropdownDivider />
<div
style={{ textAlign: 'center', padding: magma.spaceScale.spacing05 }}
>
<p>
Don't have an account?
<br />
<a href="#">Register today!</a>
</p>
</div>
</DropdownContent>
</Dropdown>
);
}
```

### Dropdown with Filter

```tsx
Expand Down

2 comments on commit f14ff08

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.