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

Fix - Dropdown - Removing docs and storybook examples of the Dropdown form #1148

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading