Skip to content

Commit b0dbe9e

Browse files
committed
Flip copy to new button in RTL, and use a class for flipping buttons
1 parent 8f23093 commit b0dbe9e

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

src/components/sound-editor/sound-editor.css

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,16 +171,7 @@ $border-radius: 0.25rem;
171171
margin-bottom: -0.375rem;
172172
}
173173

174-
/* mirror the louder/softer/mute speaker icons when rtl */
175-
[dir="rtl"] .effect-button:nth-of-type(4) img {
176-
transform: scaleX(-1);
177-
}
178-
179-
[dir="rtl"] .effect-button:nth-of-type(5) img {
180-
transform: scaleX(-1);
181-
}
182-
183-
[dir="rtl"] .effect-button:nth-of-type(6) img {
174+
[dir="rtl"] .flip-in-rtl img {
184175
transform: scaleX(-1);
185176
}
186177

src/components/sound-editor/sound-editor.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ const SoundEditor = props => (
195195
onClick={props.onPaste}
196196
/>
197197
<IconButton
198-
className={styles.toolButton}
198+
className={classNames(styles.toolButton, styles.flipInRtl)}
199199
img={copyToNewIcon}
200200
title={props.intl.formatMessage(messages.copyToNew)}
201201
onClick={props.onCopyToNew}
@@ -265,19 +265,19 @@ const SoundEditor = props => (
265265
onClick={props.onSlower}
266266
/>
267267
<IconButton
268-
className={styles.effectButton}
268+
className={classNames(styles.effectButton, styles.flipInRtl)}
269269
img={louderIcon}
270270
title={<FormattedMessage {...messages.louder} />}
271271
onClick={props.onLouder}
272272
/>
273273
<IconButton
274-
className={styles.effectButton}
274+
className={classNames(styles.effectButton, styles.flipInRtl)}
275275
img={softerIcon}
276276
title={<FormattedMessage {...messages.softer} />}
277277
onClick={props.onSofter}
278278
/>
279279
<IconButton
280-
className={styles.effectButton}
280+
className={classNames(styles.effectButton, styles.flipInRtl)}
281281
img={muteIcon}
282282
title={<FormattedMessage {...messages.mute} />}
283283
onClick={props.onMute}

0 commit comments

Comments
 (0)