mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 06:52:41 +01:00
REF: LNNodeBar to TS (#6157)
This commit is contained in:
parent
0e8f3e1fcc
commit
12448ca890
1 changed files with 15 additions and 10 deletions
|
@ -1,12 +1,24 @@
|
|||
import React from 'react';
|
||||
import { View, Text, StyleSheet } from 'react-native';
|
||||
import loc, { formatBalanceWithoutSuffix } from '../loc';
|
||||
import PropTypes from 'prop-types';
|
||||
import { BitcoinUnit } from '../models/bitcoinUnits';
|
||||
import { useTheme } from './themes';
|
||||
|
||||
export const LNNodeBar = props => {
|
||||
const { canReceive = 0, canSend = 0, nodeAlias = '', disabled = false, itemPriceUnit = BitcoinUnit.SATS } = props;
|
||||
interface LNNodeBarProps {
|
||||
canReceive: number;
|
||||
canSend: number;
|
||||
nodeAlias?: string;
|
||||
disabled?: boolean;
|
||||
itemPriceUnit?: BitcoinUnit;
|
||||
}
|
||||
|
||||
export const LNNodeBar: React.FC<LNNodeBarProps> = ({
|
||||
canReceive = 0,
|
||||
canSend = 0,
|
||||
nodeAlias = '',
|
||||
disabled = false,
|
||||
itemPriceUnit = BitcoinUnit.SATS,
|
||||
}) => {
|
||||
const { colors } = useTheme();
|
||||
const opacity = { opacity: disabled ? 0.5 : 1.0 };
|
||||
const canSendBarFlex = {
|
||||
|
@ -42,13 +54,6 @@ export const LNNodeBar = props => {
|
|||
|
||||
export default LNNodeBar;
|
||||
|
||||
LNNodeBar.propTypes = {
|
||||
canReceive: PropTypes.number.isRequired,
|
||||
canSend: PropTypes.number.isRequired,
|
||||
nodeAlias: PropTypes.string,
|
||||
disabled: PropTypes.bool,
|
||||
itemPriceUnit: PropTypes.string,
|
||||
};
|
||||
const styles = StyleSheet.create({
|
||||
root: {
|
||||
flex: 1,
|
Loading…
Add table
Reference in a new issue