-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiSuperDatePicker] Convert date popover styles to Emotion (#7908)
- Loading branch information
Showing
10 changed files
with
400 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**CSS-in-JS conversions** | ||
|
||
- Converted `EuiSuperDatePicker`'s date popover content to Emotion |
1 change: 0 additions & 1 deletion
1
packages/eui/src/components/date_picker/super_date_picker/_index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
@import 'date_popover/index'; | ||
@import 'quick_select_popover/index'; |
19 changes: 0 additions & 19 deletions
19
packages/eui/src/components/date_picker/super_date_picker/date_popover/_absolute_tab.scss
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
.../eui/src/components/date_picker/super_date_picker/date_popover/_date_popover_content.scss
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
packages/eui/src/components/date_picker/super_date_picker/date_popover/_index.scss
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
...ages/eui/src/components/date_picker/super_date_picker/date_popover/absolute_tab.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { css } from '@emotion/react'; | ||
|
||
import { UseEuiTheme } from '../../../../services'; | ||
import { logicalCSS, mathWithUnits } from '../../../../global_styling'; | ||
|
||
export const euiAbsoluteTabDateFormStyles = (euiThemeContext: UseEuiTheme) => { | ||
const { euiTheme } = euiThemeContext; | ||
|
||
return { | ||
euiAbsoluteTabDateForm: css` | ||
${logicalCSS('padding-horizontal', euiTheme.size.s)} | ||
${logicalCSS('padding-bottom', euiTheme.size.s)} | ||
`, | ||
euiAbsoluteTabDateForm__submit: css` | ||
flex-shrink: 0; | ||
`, | ||
euiAbsoluteTabDateForm__row: css` | ||
flex-grow: 1; | ||
/* CSS hack to make the help/error text extend to the submit button. | ||
* We can't actually put the submit button within an EuiFormRow due to | ||
* cloneElement limitations (https://github.com/elastic/eui/issues/2493#issuecomment-561278494) | ||
* TODO: Remove this and clean up DOM rendering once we can | ||
*/ | ||
.euiFormRow__text { | ||
${logicalCSS( | ||
'margin-right', | ||
mathWithUnits( | ||
[euiTheme.size.xl, euiTheme.size.s], | ||
(submitButtonSize, gapSize) => -1 * (submitButtonSize + gapSize) | ||
) | ||
)} | ||
} | ||
`, | ||
}; | ||
}; |
Oops, something went wrong.