watadarkstar / react-native-typing-animation

💬 A typing animation for your React Native chat app based on simple trigonometry to create better loaders.
https://www.npmjs.com/package/react-native-typing-animation
MIT License
286 stars 17 forks source link

Allow configurable visibility #25

Closed ghost closed 4 years ago

ghost commented 4 years ago

What does this PR do?

Allows visibility of the view to be configurable

Screenshots

Normal

import React from "react";
import { TypingAnimation } from 'react-native-typing-animation';

class Example extends React.Component {
  render() {
    return (
      <TypingAnimation 
        dotColor="black"
        dotMargin={10}
        dotAmplitude={3}
        dotSpeed={0.08}
        dotRadius={6.5}
        dotX={12}
        dotY={6}
      />
    );
  }
}

Output

normal

Hidden

import React from "react";
import { TypingAnimation } from 'react-native-typing-animation';

class Example extends React.Component {
  render() {
    return (
      <TypingAnimation 
        dotColor="black"
        dotMargin={10}
        dotAmplitude={3}
        dotSpeed={0.15} // Can be left out
        dotRadius={6.5}
        dotX={12}
        dotY={6}
        show={false}
      />
    );
  }
}

Output

blank