Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
fix: 修复不能更改颜色和速度问题
Browse files Browse the repository at this point in the history
  • Loading branch information
vortesnail committed Dec 2, 2019
1 parent c37ea39 commit 539fc78
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/MeteorRainLoading/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const LoadContainer = styled.div`

const Star = styled.div`
height: 2px;
background: linear-gradient(-45deg, #00adb5, rgba(0, 0, 255, 0));
background: linear-gradient(-45deg, ${props => props.color || '#00adb5'}, rgba(0, 0, 255, 0));
position: absolute;
border-radius: 50%;
/* filter: drop-shadow(0 0 6px #c7ecee); */
Expand Down
3 changes: 1 addition & 2 deletions src/components/RotateCircleLoading/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const LoadContainer = styled.div`
const CircleOne = styled.div`
left: 0;
top: 0;
animation-delay: 0s;
`

const CircleTwo = styled.div`
Expand All @@ -70,7 +69,7 @@ const CircleFour = styled.div`

const RotateCircleLoading = ({ style, color, speed }) => {
return (
<LoadContainer style={style} speed={speed}>
<LoadContainer style={style} speed={speed} color={color}>
<CircleOne color={color} speed={speed} />
<CircleTwo color={color} speed={speed} />
<CircleThree color={color} speed={speed} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/SemipolarLoading/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const HalfCircle = styled.div`

const SemipolarLoading = ({ style, color, speed }) => {
return (
<LoadContainer style={style}>
<LoadContainer style={style} speed={speed}>
{
Array.from(Array(5)).map((item, index) => <HalfCircle color={color} speed={speed} key={index}/>)
}
Expand Down
2 changes: 1 addition & 1 deletion src/stories/JumpCircleLoading.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs,number, text } from '@storybook/addon-knobs';
import { withKnobs, number, text } from '@storybook/addon-knobs';
import { JumpCircleLoading } from '~/components';
import Container from './compoment/Container';
storiesOf('JumpCircleLoading', module)
Expand Down
2 changes: 1 addition & 1 deletion src/stories/compoment/DemoContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const DemoContainer = () => {
<StickyBallLoading style={style} speed={3}/>
</div>
<div className="item" onClick={() => setName('SemipolarLoading')}>
<SemipolarLoading style={style} speed={3}/>
<SemipolarLoading style={style} speed={2}/>
</div>
</div>
</div>
Expand Down

0 comments on commit 539fc78

Please sign in to comment.