mirror of
https://github.com/dream-num/univer.git
synced 2026-08-28 23:01:30 +08:00
fix(design): preserve gallery controls in RTL (#7419)
This commit is contained in:
@@ -158,6 +158,7 @@ export function Gallery(props: IGalleryProps) {
|
||||
univer-absolute univer-bottom-6 univer-left-1/2 univer-flex -univer-translate-x-1/2
|
||||
univer-items-center univer-gap-3 univer-rounded-full univer-bg-gray-800 univer-px-6 univer-py-3
|
||||
univer-text-gray-400
|
||||
rtl:univer-flex-row-reverse
|
||||
`}
|
||||
>
|
||||
{hasPagination && (
|
||||
|
||||
+10
@@ -84,6 +84,16 @@ describe('Gallery', () => {
|
||||
expect(screen.getByRole('button', { name: /reset zoom/i })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('keeps the toolbar controls in logical order in RTL', () => {
|
||||
render(
|
||||
<ConfigProvider locale={enUS.design} direction="rtl" mountContainer={document.body}>
|
||||
<Gallery images={images} open />
|
||||
</ConfigProvider>
|
||||
);
|
||||
|
||||
expect(screen.getByRole('dialog').querySelector('footer')).toHaveClass('rtl:univer-flex-row-reverse');
|
||||
});
|
||||
|
||||
it('zoom in/out/reset buttons adjust the image scale', () => {
|
||||
renderGallery({ images, open: true });
|
||||
const img = screen.getByRole('img');
|
||||
Reference in New Issue
Block a user