Skip to content

Commit c454155

Browse files
Merge pull request #96 from ali2-godaddy/fix-rtl-issues
fix: Styling fixes for RTL documents and element hover
2 parents 760b89b + 0489d01 commit c454155

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

src/carousel.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
.carousel-viewport {
1414
overflow: hidden;
1515
white-space: nowrap;
16-
text-align: left;
16+
text-align: start;
1717
}
1818

1919
.carousel-arrow-default {

src/rtl.less

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
[dir="rtl"] .carousel {
2-
.carousel-viewport {
3-
text-align: right;
4-
}
5-
62
.carousel-left-arrow {
73
left: unset;
84
right: 23px;

src/stories/index.stories.jsx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,12 +470,37 @@ export const RightAlignedSlides = {
470470
}
471471
};
472472

473+
const RTL_TEXT_SLIDES = [
474+
{ label: 'RTL ←', text: 'Hello' },
475+
{ label: 'RTL ←', text: 'World' },
476+
{ label: 'RTL ←', text: 'Test' },
477+
{ label: 'RTL ←', text: '1' },
478+
{ label: 'RTL ←', text: '2' },
479+
{ label: 'RTL ←', text: '3' }
480+
].map(({ label, text }, index) => (
481+
<div
482+
key={ index }
483+
style={{
484+
minHeight: '200px',
485+
padding: '24px',
486+
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
487+
color: '#fff',
488+
fontSize: '24px',
489+
width: '250px',
490+
borderRadius: '8px'
491+
}}
492+
>
493+
<span style={{ fontSize: '14px', opacity: 0.9 }}>{label}</span>
494+
<span>{text}</span>
495+
</div>
496+
));
497+
473498
export const Rtl = {
474499
args: {
475500
width: '450px',
476501
cellPadding: 5,
477502
dir: 'rtl',
478-
children: imgElements
503+
children: RTL_TEXT_SLIDES
479504
},
480505
render: (args) => (
481506
<div dir='rtl'>

0 commit comments

Comments
 (0)