Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 0 additions & 2 deletions src-docs/src/views/datagrid/styling.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ export default class DataGrid extends Component {
button={styleButton}
isOpen={this.state.isPopoverOpen}
anchorPosition="rightUp"
zIndex={3}
Comment thread
thompsongl marked this conversation as resolved.
closePopover={this.closePopover.bind(this)}>
<div style={{ width: 300 }}>
<EuiFormRow label="Border" display="columnCompressed">
Expand Down Expand Up @@ -505,7 +504,6 @@ export default class DataGrid extends Component {
button={toolbarButton}
isOpen={this.state.isToolbarPopoverOpen}
anchorPosition="rightUp"
zIndex={3}
closePopover={this.closeToolbarPopover.bind(this)}>
<div style={{ width: 400 }}>
<EuiFormRow
Expand Down
24 changes: 17 additions & 7 deletions src-docs/src/views/form_controls/field_password.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
import React, { useState } from 'react';

import { EuiFieldPassword } from '../../../../src/components';
import { EuiFieldPassword, EuiSwitch } from '../../../../src/components';
import { DisplayToggles } from './display_toggles';

export default function() {
const [value, setValue] = useState('');

const onChange = e => {
setValue(e.target.value);
};
const [dual, setDual] = useState(true);

return (
/* DisplayToggles wrapper for Docs only */
<DisplayToggles canAppend canPrepend>
<DisplayToggles
canAppend
canPrepend
extras={[
<EuiSwitch
compressed
label={'dual'}
checked={dual}
onChange={e => {
setDual(e.target.checked);
}}
/>,
]}>
<EuiFieldPassword
placeholder="Placeholder text"
type={dual ? 'dual' : undefined}
value={value}
onChange={e => onChange(e)}
onChange={e => setValue(e.target.value)}
aria-label="Use aria labels when no actual label is in use"
/>
</DisplayToggles>
Expand Down
1 change: 1 addition & 0 deletions src-docs/src/views/form_controls/form_controls_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const fieldPasswordSnippet = [
placeholder="Placeholder text"
value={value}
onChange={onChange}
type="dual"
/>`,
];

Expand Down
Loading