Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/Bars.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ export default class Bubbles extends Component {
static propTypes = {
size: PropTypes.number,
color: PropTypes.string,
spaceBetween: PropTypes.number
spaceBetween: PropTypes.number,
bgColor:PropTypes.string
};

static defaultProps = {
spaceBetween: 4,
size: 20,
color: '#000'
color: '#000',
bgColor:'transparent'
};

state = {
Expand Down Expand Up @@ -76,11 +78,11 @@ export default class Bubbles extends Component {
}

render() {
const { size, spaceBetween } = this.props;
const { size, spaceBetween, bgColor } = this.props;
const width = size / 3 * 5 + spaceBetween * 4;
const height = size * 3;

return (<Surface width={width} height={height}>
return (<Surface width={width} height={height} style={{backgroundColor:bgColor}}>
{this.renderBar(0)}
{this.renderBar(1)}
{this.renderBar(2)}
Expand Down
10 changes: 6 additions & 4 deletions src/Bubbles.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ export default class Bubbles extends Component {
static propTypes = {
size: PropTypes.number,
color: PropTypes.string,
spaceBetween: PropTypes.number
spaceBetween: PropTypes.number,
bgColor:PropTypes.string
};

static defaultProps = {
spaceBetween: 6,
size: 11,
color: '#000'
color: '#000',
bgColor:'transparent'
};

state = {
Expand Down Expand Up @@ -77,11 +79,11 @@ export default class Bubbles extends Component {
}

render() {
const { size, spaceBetween } = this.props;
const { size, spaceBetween, bgColor } = this.props;
const width = size * 6 + spaceBetween * 2;
const height = size * 2;

return (<Surface width={width} height={height}>
return (<Surface width={width} height={height} style={{backgroundColor:bgColor}}>
{this.renderBubble(0)}
{this.renderBubble(1)}
{this.renderBubble(2)}
Expand Down
10 changes: 6 additions & 4 deletions src/DoubleBounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import Circle from './animated/Circle';
export default class Pulse extends Component {
static propTypes = {
size: PropTypes.number,
color: PropTypes.string
color: PropTypes.string,
bgColor:PropTypes.string
};

static defaultProps = {
size: 14,
color: '#000'
color: '#000',
bgColor:'transparent'
};

state = {
Expand Down Expand Up @@ -50,12 +52,12 @@ export default class Pulse extends Component {
}

render() {
const { size, color } = this.props;
const { size, color, bgColor} = this.props;
const { bounces: [scale1, scale2] } = this.state;
const width = size * 2;
const height = size * 2;

return (<Surface width={width} height={height}>
return (<Surface width={width} height={height} style={{backgroundColor:bgColor}}>
<Circle
radius={size}
fill={color}
Expand Down
10 changes: 6 additions & 4 deletions src/Pulse.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import Circle from './animated/Circle';
export default class Pulse extends Component {
static propTypes = {
size: PropTypes.number,
color: PropTypes.string
color: PropTypes.string,
bgColor:PropTypes.string
};

static defaultProps = {
size: 14,
color: '#000'
color: '#000',
bgColor:'transparent'
};

state = {
Expand Down Expand Up @@ -50,12 +52,12 @@ export default class Pulse extends Component {
}

render() {
const { size, color } = this.props;
const { size, color, bgColor } = this.props;
const { pulse } = this.state;
const width = size * 2;
const height = size * 2;

return (<Surface width={width} height={height}>
return (<Surface width={width} height={height} style={{backgroundColor:bgColor}}>
<Circle
radius={size}
fill={color}
Expand Down