Skip to content

Commit

Permalink
fix: mobile play mode icon align style
Browse files Browse the repository at this point in the history
  • Loading branch information
lijinke666 committed Aug 30, 2020
1 parent 58b3ad0 commit 5e1a819
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 5 deletions.
6 changes: 5 additions & 1 deletion __tests__/tests/__snapshots__/icon.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,11 @@ exports[`Player custom icon test should render custom icon in mobile mode 1`] =
<span
class="audio-lists-panel-header-close-btn"
title="Close"
/>
>
<div>
1
</div>
</span>
</span>
</h2>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/AudioListsPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const AudioListsPanel = ({
title={locale.closeText}
onClick={onCancel}
>
{isMobile ? icon.packUp : icon.close}
{isMobile ? icon.packUpPanelMobile : icon.close}
</span>
</span>
</h2>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PlayModeTip.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { memo } from 'react'
import cls from 'classnames'
import React, { memo } from 'react'

const PlayModeTip = ({ prefix, visible, title, text }) => (
<div className={cls(`${prefix}-play-model-tip`, { show: visible })}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PlayModel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { memo } from 'react'
import cls from 'classnames'
import React, { memo } from 'react'

const PlayModel = ({ visible, value }) => (
<div
Expand Down
2 changes: 1 addition & 1 deletion src/components/PlayerMobile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { isValidElement, memo } from 'react'
import cls from 'classnames'
import React, { isValidElement, memo } from 'react'
import PlayModeTip from './PlayModeTip'

const prefix = 'react-jinke-music-player-mobile'
Expand Down
3 changes: 3 additions & 0 deletions src/styles/audioListsPanel.less
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
font-weight: 500;
transition: color @common-animate-time;
}
&-num {
margin-left: 10px;
}
&-actions {
display: flex;
flex-grow: 1;
Expand Down
5 changes: 5 additions & 0 deletions src/styles/playerMobile.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
box-shadow: 0 2px @mobile-padding rgba(0, 0, 0, 0.1);
transform: translate3d(0, -105%, 0);
transition: transform @common-animate-time;
display: flex;
align-items: center;

&-title {
margin-right: 12px;
Expand All @@ -52,6 +54,9 @@
color: #fff !important;
}
}
.loop-btn {
display: flex;
}
}
&-text {
font-size: 14px;
Expand Down

0 comments on commit 5e1a819

Please sign in to comment.