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

[EuiDatePickerRange][EuiSuperDatePicker] Convert to dogfood EuiFormControlLayoutDelimited #6705

Merged
merged 13 commits into from
Apr 13, 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
2 changes: 1 addition & 1 deletion src-docs/src/views/date_picker/range.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default () => {

return (
/* DisplayToggles wrapper for Docs only */
<DisplayToggles canCompressed={false} canLoading={false}>
<DisplayToggles canCompressed={false}>
<EuiDatePickerRange
isInvalid={startDate > endDate}
startDateControl={
Expand Down
45 changes: 45 additions & 0 deletions src-docs/src/views/form_controls/form_control_layout_range.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react';
import {
EuiFormControlLayoutDelimited,
EuiFormLabel,
EuiFieldNumber,
EuiIcon,
} from '../../../../src/components';

Expand Down Expand Up @@ -218,5 +219,49 @@ export default () => (
/>
}
/>

<EuiFormControlLayoutDelimited
isDisabled
prepend={<EuiFormLabel>Disabled</EuiFormLabel>}
startControl={
<input
type="number"
placeholder="0"
className="euiFieldNumber"
disabled
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<input
type="number"
placeholder="100"
className="euiFieldNumber"
disabled
aria-label="Use aria labels when no actual label is in use"
/>
}
/>

<EuiFormControlLayoutDelimited
isInvalid
prepend={<EuiFormLabel>Invalid</EuiFormLabel>}
startControl={
<EuiFieldNumber
isInvalid
controlOnly
placeholder="0"
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<EuiFieldNumber
isInvalid
controlOnly
placeholder="100"
aria-label="Use aria labels when no actual label is in use"
/>
}
/>
</div>
);
14 changes: 14 additions & 0 deletions src-docs/src/views/super_date_picker/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ export const superDatePickerConfig = () => {
propsToUse.onTimeChange = simulateFunction(propsToUse.onTimeChange, true);
propsToUse.onRefreshChange = simulateFunction(propsToUse.onRefreshChange);

propsToUse.isPaused = {
...propsToUse.isPaused,
type: PropTypes.Boolean,
defaultValue: true,
value: true,
};

propsToUse.showUpdateButton = {
...propsToUse.showUpdateButton,
type: PropTypes.Boolean,
defaultValue: true,
value: true,
};

propsToUse.locale = {
...propsToUse.locale,
type: PropTypes.String,
Expand Down
Loading