Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-floting-button
Advanced tools
Readme
Floating button for React Native
yarn add react-floting-button
Or
npm install react-floting-button
first step: import the component:
import {FloatingButton} from "react-floting-button"
Second step: define the buttons
const actions = [
{
text: "Reload",
icon: "reload",
link: 'callback',
size:20,
color:'#555',
position: 1,
},
{
text: "Order",
icon: "food-fork-drink",
link: "foofScreen",
size:20,
color:'#555',
position: 2
},
]
Third step: use it
<FloatingButton
actions={actions}
text="$17.00"
title="pay"
navigation={navigation}
/>
import {FloatingButton} from "react-floting-button" ;
const actions = [
{
text: "Reload",
icon: "reload",
link: 'callback',
size:20,
color:'#555',
position: 1,
},
{
text: "Order",
icon: "food-fork-drink",
link: "foofScreen",
size:20,
color:'#555',
position: 2
},
]
export default class App extends Component {
constructor(props){
super(props)
}
render(){
const {navigation} = this.props ;
return (
<View style={styles.container}>
<View style={{flex:1,justifyContent:"center",alignItems:"center"}}>
<Text>Ici button exemple</Text>
</View>
<FloatingButton
actions={actions}
text="$17.00"
title="pay"
navigation={navigation}
/>
</View>
) ;
}
FloatingButton
Property | Type | Default | Description |
---|---|---|---|
actions | array | [] | Actions to be show once user press the main button |
color | string | #FFF | Color of the main button |
backgroundColor | string | #00B15E | background color of the main button |
AnimatedbackgroundColor | string | rgba(0,0,0,.2) | background color of view animated |
text | string | Title of main button is Required | |
title | string | label of main button when is clicked is Required | |
navigation | object | navigation props is Required when you are linked button to another screen |
Actions
Property | Type | Default | Description |
---|---|---|---|
text | string | Text to show near to the button. | |
icon | string | Icon to be rendered inside the action, we accept the name of icon refer to **'react-native-vector-icons/MaterialCommunityIcons' ** | |
link | string | the screen name where you want to go once the button click (route name) | |
size | number | size of Icon | |
color | string | Color of the Icon button | |
position | string | element positioning, at which position to display each button first, second or .. |
FAQs
Simple floating button component for react-native
The npm package react-floting-button receives a total of 7 weekly downloads. As such, react-floting-button popularity was classified as not popular.
We found that react-floting-button demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.