-
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.
And converted `EuiPopoverTitle` to TS
- Loading branch information
Showing
16 changed files
with
151 additions
and
48 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
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
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
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
9 changes: 9 additions & 0 deletions
9
src/components/popover/__snapshots__/popover_footer.test.tsx.snap
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,9 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`EuiPopoverFooter is rendered 1`] = ` | ||
<div | ||
aria-label="aria-label" | ||
class="euiPopoverFooter testClass1 testClass2" | ||
data-test-subj="test subject string" | ||
/> | ||
`; |
File renamed without changes.
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
@import 'mixins'; | ||
@import 'popover'; | ||
@import 'popover_title'; | ||
@import 'popover_footer'; |
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
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,16 @@ | ||
@import '../panel/variables'; // grab the $euiPanelPaddingModifiers map | ||
|
||
.euiPopoverFooter { | ||
@include euiPopoverFooter; | ||
|
||
// If the popover's containing panel has padding applied, | ||
// ensure the footer expands to cover that padding and | ||
// take on the same amount of padding horizontally | ||
|
||
@each $modifier, $amount in $euiPanelPaddingModifiers { | ||
.euiPopover__panel.euiPanel--#{$modifier} & { | ||
padding: $euiSizeM $amount; | ||
margin: $amount ($amount * -1) ($amount * -1); | ||
} | ||
} | ||
} |
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
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,3 +1,4 @@ | ||
export { EuiPopover } from './popover'; | ||
export { EuiPopoverTitle } from './popover_title'; | ||
export { EuiPopoverFooter } from './popover_footer'; | ||
export { EuiWrappingPopover } from './wrapping_popover'; |
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,13 @@ | ||
import React from 'react'; | ||
import { render } from 'enzyme'; | ||
import { requiredProps } from '../../test/required_props'; | ||
|
||
import { EuiPopoverFooter } from './popover_footer'; | ||
|
||
describe('EuiPopoverFooter', () => { | ||
test('is rendered', () => { | ||
const component = render(<EuiPopoverFooter {...requiredProps} />); | ||
|
||
expect(component).toMatchSnapshot(); | ||
}); | ||
}); |
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,21 @@ | ||
import React, { HTMLAttributes, FunctionComponent } from 'react'; | ||
import classNames from 'classnames'; | ||
import { CommonProps } from '../common'; | ||
|
||
export type EuiPopoverFooterProps = FunctionComponent< | ||
HTMLAttributes<HTMLDivElement> & CommonProps | ||
>; | ||
|
||
export const EuiPopoverFooter: EuiPopoverFooterProps = ({ | ||
children, | ||
className, | ||
...rest | ||
}) => { | ||
const classes = classNames('euiPopoverFooter', className); | ||
|
||
return ( | ||
<div className={classes} {...rest}> | ||
{children} | ||
</div> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
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
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,21 @@ | ||
import React, { HTMLAttributes, FunctionComponent } from 'react'; | ||
import classNames from 'classnames'; | ||
import { CommonProps } from '../common'; | ||
|
||
export type EuiPopoverTitleProps = FunctionComponent< | ||
HTMLAttributes<HTMLDivElement> & CommonProps | ||
>; | ||
|
||
export const EuiPopoverTitle: EuiPopoverTitleProps = ({ | ||
children, | ||
className, | ||
...rest | ||
}) => { | ||
const classes = classNames('euiPopoverTitle', className); | ||
|
||
return ( | ||
<div className={classes} {...rest}> | ||
{children} | ||
</div> | ||
); | ||
}; |