Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 8d178ab

Browse files
authored
Merge pull request #459 from lightninglabs/invoice-note
Invoice note
2 parents 149bbe2 + 7666c74 commit 8d178ab

File tree

3 files changed

+16
-7
lines changed

3 files changed

+16
-7
lines changed

src/component/field.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,24 @@ const namedStyles = StyleSheet.create({
6969
color: color.blackText,
7070
fontSize: font.sizeM,
7171
lineHeight: font.lineHeightM + 2 * 12,
72-
marginRight: 10,
72+
marginRight: 15,
7373
},
7474
text: {
7575
flex: 1,
7676
textAlign: 'right',
77-
fontFamily: 'OpenSans Light',
7877
fontSize: font.sizeM,
7978
lineHeight: font.lineHeightM + 2 * 12,
8079
color: color.blackText,
80+
opacity: 0.5,
8181
},
8282
});
8383

8484
export const NamedField = ({ name, children, style }) => (
8585
<View style={[namedStyles.content, style]}>
8686
<Text style={namedStyles.name}>{name}</Text>
87-
<Text style={namedStyles.text}>{children}</Text>
87+
<Text style={namedStyles.text} numberOfLines={1}>
88+
{children}
89+
</Text>
8890
</View>
8991
);
9092

src/view/pay-lightning-confirm.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Header, Title } from '../component/header';
99
import { CancelButton, BackButton, PillButton } from '../component/button';
1010
import Card from '../component/card';
1111
import Icon from '../component/icon';
12-
import { FormStretcher, FormText } from '../component/form';
12+
import { FormStretcher } from '../component/form';
1313
import {
1414
BalanceLabel,
1515
BalanceLabelNumeral,
@@ -34,6 +34,10 @@ const styles = StyleSheet.create({
3434
totalLbl: {
3535
marginTop: 5,
3636
},
37+
note: {
38+
marginTop: 5,
39+
borderBottomWidth: 0,
40+
},
3741
confirmBtn: {
3842
marginTop: 20,
3943
},
@@ -50,9 +54,6 @@ const PayLightningConfirmView = ({ store, nav, payment }) => (
5054
</Header>
5155
<MainContent>
5256
<Card>
53-
<FormText style={styles.description}>
54-
You are about to send a Bitcoin payment over the Lightning Network.
55-
</FormText>
5657
<FormStretcher>
5758
<BalanceLabel style={styles.balance}>
5859
<BalanceLabelNumeral style={styles.numeral}>
@@ -68,6 +69,11 @@ const PayLightningConfirmView = ({ store, nav, payment }) => (
6869
<NamedField name="Total" style={styles.totalLbl}>
6970
{store.paymentTotalLabel} {store.unitLabel}
7071
</NamedField>
72+
{store.payment.note ? (
73+
<NamedField name="Note" style={styles.note}>
74+
{store.payment.note}
75+
</NamedField>
76+
) : null}
7177
</FormStretcher>
7278
<PillButton
7379
style={styles.confirmBtn}

stories/screen.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ store.payments = [...Array(10)].map(() => ({
200200
status: 'complete',
201201
date: new Date(),
202202
}));
203+
store.payment.note = '#craefulgang';
203204
store.selectedTransaction = (store.computedTransactions || []).find(
204205
tx => tx.type === 'bitcoin'
205206
);

0 commit comments

Comments
 (0)