Skip to content

Commit

Permalink
Merge branch '8.1.0' into table
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwebdev authored Feb 20, 2025
2 parents c4dba77 + 26aa104 commit 7b6b5dc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @ebay/ui-core-react

## 8.0.4

### Patch Changes

- [#447](https://github.com/eBay/ebayui-core-react/pull/447) [`84b78de`](https://github.com/eBay/ebayui-core-react/commit/84b78de4da25b4b288bc74ab29537a826e479810) Thanks [@montoya332](https://github.com/montoya332)! - fix: top passthrough prop on light box

## 8.0.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ebay/ui-core-react",
"version": "8.0.3",
"version": "8.0.4",
"description": "Skin components build off React",
"publishConfig": {
"registry": "https://registry.npmjs.org",
Expand Down
16 changes: 15 additions & 1 deletion src/ebay-lightbox-dialog/__tests__/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ jest.mock('../../common/random-id')

const closeSpy = jest.fn()
const openSpy = jest.fn()
const openDialog = () =>
const openDialog = (props = {}) =>
render(
<EbayLightboxDialog
animated={false}
open
onOpen={openSpy}
onClose={closeSpy}
a11yCloseText="Close"
{...props}
>
<EbayDialogHeader>Heading</EbayDialogHeader>
<p>
Expand Down Expand Up @@ -49,4 +50,17 @@ describe('<EbayLightboxDialog>', () => {
fireEvent.click(document.querySelector(`button.lightbox-dialog__close`))
expect(closeSpy).toHaveBeenCalled()
})

it('should render custom top content', () => {
openDialog({
top: <div className="custom-top">Top</div>
})
expect(document.querySelector('.custom-top')).toBeInTheDocument()
})
it('should render banner image', () => {
openDialog({
bannerImgSrc:"http://ir.ebaystatic.com/cr/v/c1/skin/image-treatment/mountain.jpeg",
})
expect(document.querySelector('.lightbox-dialog__image')).toBeInTheDocument()
})
})
2 changes: 1 addition & 1 deletion src/ebay-lightbox-dialog/lightbox-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const EbayLightboxDialog: FC<Props> = ({
backgroundImage: `url(${bannerImgSrc})`,
backgroundPosition: bannerImgPosition
}} />
) : null
) : rest.top

return (
<DialogBaseWithState
Expand Down

0 comments on commit 7b6b5dc

Please # to comment.