Skip to content

Commit

Permalink
[EuiSuperDatePicker] Emotion conversion button fixes (#7911)
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen authored Jul 25, 2024
1 parent 3fec66b commit 28a82ac
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const euiDatePopoverButtonStyles = (euiThemeContext: UseEuiTheme) => {
return {
euiDatePopoverButton: css`
${_buttonStyles(euiThemeContext)}
justify-content: center;
`,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export const euiSuperDatePickerStyles = (euiThemeContext: UseEuiTheme) => {

euiSuperDatePicker__range: css`
flex-grow: 1;
overflow: hidden;
`,
euiSuperDatePicker__rangeInput: css`
flex-grow: 1;
Expand All @@ -133,6 +134,7 @@ export const euiSuperDatePickerStyles = (euiThemeContext: UseEuiTheme) => {
`,
euiSuperDatePicker__prettyFormat: css`
${_buttonStyles(euiThemeContext)}
text-align: start;
`,

// Form states
Expand Down Expand Up @@ -176,15 +178,26 @@ export const euiSuperDatePickerStyles = (euiThemeContext: UseEuiTheme) => {
needsUpdating: css`
/* Extra specificity needed to override default delimited styles */
.euiFormControlLayoutDelimited .euiFormControlLayout__childrenWrapper {
--euiFormControlStateColor: ${euiTheme.colors.success};
color: ${needsUpdatingTextColor};
background-color: ${needsUpdatingBackgroundColor};
background-size: 100% 100%;
}
.euiFormControlLayoutDelimited__delimiter {
color: inherit;
}
/* Focus/selection underline per-button */
.euiDatePopoverButton {
${euiFormControlDefaultShadow(euiThemeContext)}
background-color: inherit;
box-shadow: none;
}
.euiDatePopoverButton:focus,
.euiPopover-isOpen .euiDatePopoverButton {
--euiFormControlStateColor: ${euiTheme.colors.success};
background-size: 100% 100%;
}
`,
},
};
Expand All @@ -198,12 +211,10 @@ export const _buttonStyles = (euiThemeContext: UseEuiTheme) => {
${logicalCSS('width', '100%')}
${logicalCSS('padding-horizontal', euiTheme.size.s)}
/* Align content automatically for compressed heights */
display: flex;
align-items: center;
font-size: ${euiFontSize(euiThemeContext, 's').fontSize};
word-break: break-all;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
color: inherit;
background-color: inherit;
Expand Down

0 comments on commit 28a82ac

Please sign in to comment.