
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
rn-topbutton-animation
Advanced tools
https://www.npmjs.com/package/rn-topbutton-animation
## Installation
Version 1.0.8
npm install rn-topbutton-animation --save
import React from 'react';
import {View, Text, Image} from 'react-native';
import {HeaderSlide} from 'rn-topbutton-animation';
import {globalStyle, width, height} from '../components/styles';
export default function Check({navigation}) {
function renderFirstItem() {
return (
<View
style={{
justifyContent: 'center',
alignItems: 'center',
top: width / 4,
}}>
<Image
source={require('../../assets/notfound.jpg')}
style={{
justifyContent: 'center',
height: height * 0.5,
resizeMode: 'center',
top: height / 4,
}}
/>
</View>
);
}
function renderSecondItem() {
return (
<View
style={{
justifyContent: 'center',
alignItems: 'center',
top: width / 4,
}}>
<Text>Hello world2</Text>
</View>
);
}
function renderThirdItem() {
return (
<View
style={{
justifyContent: 'center',
alignItems: 'center',
top: width / 4,
}}>
<Text>Hello world3</Text>
<Text>I Just Built this package</Text>
</View>
);
}
function renderFourthItem() {
return (
<View
style={{
justifyContent: 'center',
alignItems: 'center',
top: width / 4,
}}>
<Text>Hello world4</Text>
<Text>I am Software Engineer</Text>
</View>
);
}
const data = ['article', 'foto',];
return (
<View>
<HeaderSlide
title={data}
renderFirstItem={renderFirstItem}
renderSecondItem={renderSecondItem}
renderThirdItem={renderThirdItem}
renderFourthItem={renderFourthItem}
/>
</View>
);
}
| Property | Type | Description |
|---|---|---|
| renderFirstItem | function (required) | render component |
| renderSecondItem | function (required) | render component |
| renderThirdItem | function (optional) | render component |
| renderFourthItem | function (optional) | render component |
| title | PropTypes.Array (required) | button title |
| buttonColor | PropTypes.String (optional) | color for button |
note : the amount of render item must same with the length of title. title must have length at least 2 and maximum 4
Arwy Syahputra Siregar
github.com/arwysyah
Copyright ©
by Arwy Syahputra Siregar
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.