@@ -5,6 +5,7 @@ import { action } from '@storybook/addon-actions';
55import sinon from 'sinon' ;
66import { Store } from '../src/store' ;
77import NavAction from '../src/action/nav' ;
8+ import NavActionMobile from '../src/action/nav-mobile' ;
89import IpcAction from '../src/action/ipc' ;
910import GrpcAction from '../src/action/grpc' ;
1011import InfoAction from '../src/action/info' ;
@@ -93,6 +94,7 @@ const store = new Store();
9394store . init ( ) ;
9495const file = sinon . createStubInstance ( FileAction ) ;
9596const nav = sinon . createStubInstance ( NavAction ) ;
97+ const navMobile = sinon . createStubInstance ( NavActionMobile ) ;
9698const db = sinon . createStubInstance ( AppStorage ) ;
9799const ipc = sinon . createStubInstance ( IpcAction ) ;
98100const grpc = sinon . createStubInstance ( GrpcAction ) ;
@@ -133,14 +135,14 @@ storiesOf('Screens', module)
133135 . add ( 'Select Seed' , ( ) => (
134136 < SelectSeed store = { store } wallet = { wallet } setting = { setting } />
135137 ) )
136- . add ( 'Seed Intro (Mobile)' , ( ) => < SeedIntro nav = { nav } /> )
138+ . add ( 'Seed Intro (Mobile)' , ( ) => < SeedIntro nav = { navMobile } /> )
137139 . add ( 'Seed' , ( ) => < Seed store = { store } wallet = { wallet } /> )
138140 . add ( 'Seed (Mobile)' , ( ) => < SeedMobile store = { store } wallet = { wallet } /> )
139141 . add ( 'Seed Verify' , ( ) => (
140142 < SeedVerify store = { store } nav = { nav } wallet = { wallet } />
141143 ) )
142144 . add ( 'Seed Verify (Mobile)' , ( ) => (
143- < SeedVerifyMobile store = { store } nav = { nav } wallet = { wallet } />
145+ < SeedVerifyMobile store = { store } nav = { navMobile } wallet = { wallet } />
144146 ) )
145147 . add ( 'Restore Wallet: Seed' , ( ) => (
146148 < RestoreSeed store = { store } wallet = { wallet } />
@@ -157,7 +159,7 @@ storiesOf('Screens', module)
157159 < SetPasswordConfirm store = { store } wallet = { wallet } />
158160 ) )
159161 . add ( 'Set PIN (Mobile)' , ( ) => (
160- < SetPinMobile store = { store } auth = { auth } nav = { nav } />
162+ < SetPinMobile store = { store } auth = { auth } nav = { navMobile } />
161163 ) )
162164 . add ( 'Set PIN Confirm (Mobile)' , ( ) => (
163165 < SetPinConfirmMobile store = { store } auth = { auth } />
@@ -175,15 +177,15 @@ storiesOf('Screens', module)
175177 ) )
176178 . add ( 'Reset Password - Saved' , ( ) => < ResetPasswordSaved nav = { nav } /> )
177179 . add ( 'Reset PIN - Current (Mobile)' , ( ) => (
178- < ResetPinCurrent store = { store } auth = { auth } nav = { nav } />
180+ < ResetPinCurrent store = { store } auth = { auth } nav = { navMobile } />
179181 ) )
180182 . add ( 'Reset PIN - New (Mobile)' , ( ) => (
181183 < ResetPinNew store = { store } auth = { auth } />
182184 ) )
183185 . add ( 'Reset PIN - Confirm New (Mobile)' , ( ) => (
184186 < ResetPinConfirm store = { store } auth = { auth } />
185187 ) )
186- . add ( 'Reset PIN - Saved (Mobile)' , ( ) => < ResetPinSaved nav = { nav } /> )
188+ . add ( 'Reset PIN - Saved (Mobile)' , ( ) => < ResetPinSaved nav = { navMobile } /> )
187189 . add ( 'New Address' , ( ) => (
188190 < NewAddress store = { store } invoice = { invoice } info = { info } />
189191 ) )
@@ -218,24 +220,28 @@ storiesOf('Screens', module)
218220 ) )
219221 . add ( 'Notifications' , ( ) => < Notification store = { store } nav = { nav } /> )
220222 . add ( 'Notifications (Mobile)' , ( ) => (
221- < NotificationMobile store = { store } nav = { nav } />
223+ < NotificationMobile store = { store } nav = { navMobile } />
222224 ) )
223225 . add ( 'CLI' , ( ) => < CLI store = { store } nav = { nav } file = { file } /> )
224226 . add ( 'Transactions' , ( ) => (
225227 < Transaction store = { store } transaction = { transaction } nav = { nav } />
226228 ) )
227229 . add ( 'Transactions (Mobile)' , ( ) => (
228- < TransactionMobile store = { store } transaction = { transaction } nav = { nav } />
230+ < TransactionMobile
231+ store = { store }
232+ transaction = { transaction }
233+ nav = { navMobile }
234+ />
229235 ) )
230236 . add ( 'Transaction Details' , ( ) => (
231237 < TransactionDetail store = { store } nav = { nav } />
232238 ) )
233239 . add ( 'Transaction Details (Mobile)' , ( ) => (
234- < TransactionDetailMobile store = { store } nav = { nav } />
240+ < TransactionDetailMobile store = { store } nav = { navMobile } />
235241 ) )
236242 . add ( 'Channels' , ( ) => < Channel store = { store } channel = { channel } nav = { nav } /> )
237243 . add ( 'Channels (Mobile)' , ( ) => (
238- < ChannelMobile store = { store } channel = { channel } nav = { nav } />
244+ < ChannelMobile store = { store } channel = { channel } nav = { navMobile } />
239245 ) )
240246 . add ( 'Channels (Opening)' , ( ) => (
241247 < Channel store = { { computedChannels : [ ] } } channel = { channel } nav = { nav } />
@@ -244,12 +250,12 @@ storiesOf('Screens', module)
244250 < ChannelMobile
245251 store = { { computedChannels : [ ] } }
246252 channel = { channel }
247- nav = { nav }
253+ nav = { navMobile }
248254 />
249255 ) )
250256 . add ( 'Channel Details' , ( ) => < ChannelDetail store = { store } nav = { nav } /> )
251257 . add ( 'Channel Details (Mobile)' , ( ) => (
252- < ChannelDetailMobile store = { store } nav = { nav } />
258+ < ChannelDetailMobile store = { store } nav = { navMobile } />
253259 ) )
254260 . add ( 'Channel Delete' , ( ) => (
255261 < ChannelDelete store = { store } channel = { channel } nav = { nav } />
@@ -258,54 +264,58 @@ storiesOf('Screens', module)
258264 < ChannelCreate store = { store } channel = { channel } nav = { nav } />
259265 ) )
260266 . add ( 'Channel Create (Mobile)' , ( ) => (
261- < ChannelCreateMobile store = { store } channel = { channel } nav = { nav } />
267+ < ChannelCreateMobile store = { store } channel = { channel } nav = { navMobile } />
262268 ) )
263269 . add ( 'Deposit' , ( ) => < Deposit store = { store } invoice = { invoice } nav = { nav } /> )
264270 . add ( 'Deposit (Mobile)' , ( ) => (
265- < DepositMobile store = { store } invoice = { invoice } nav = { nav } />
271+ < DepositMobile store = { store } invoice = { invoice } nav = { navMobile } />
266272 ) )
267273 . add ( 'Payment' , ( ) => < Payment store = { store } payment = { payment } nav = { nav } /> )
268274 . add ( 'Pay Lightning Confirm' , ( ) => (
269275 < PayLightningConfirm store = { store } payment = { payment } nav = { nav } />
270276 ) )
271277 . add ( 'Pay Lightning Confirm (Mobile)' , ( ) => (
272- < PayLightningConfirmMobile store = { store } payment = { payment } nav = { nav } />
278+ < PayLightningConfirmMobile
279+ store = { store }
280+ payment = { payment }
281+ nav = { navMobile }
282+ />
273283 ) )
274284 . add ( 'Pay Lightning Done' , ( ) => (
275285 < PayLightningDone store = { store } payment = { payment } nav = { nav } />
276286 ) )
277287 . add ( 'Pay Lightning Done (Mobile)' , ( ) => (
278- < PayLightningDoneMobile store = { store } payment = { payment } nav = { nav } />
288+ < PayLightningDoneMobile store = { store } payment = { payment } nav = { navMobile } />
279289 ) )
280290 . add ( 'Payment Failed' , ( ) => < PaymentFailed channel = { channel } nav = { nav } /> )
281291 . add ( 'Payment Failed (Mobile)' , ( ) => (
282- < PaymentFailedMobile channel = { channel } nav = { nav } />
292+ < PaymentFailedMobile channel = { channel } nav = { navMobile } />
283293 ) )
284294 . add ( 'Pay Bitcoin' , ( ) => (
285295 < PayBitcoin store = { store } payment = { payment } nav = { nav } />
286296 ) )
287297 . add ( 'Pay Bitcoin (Mobile)' , ( ) => (
288- < PayBitcoinMobile store = { store } payment = { payment } nav = { nav } />
298+ < PayBitcoinMobile store = { store } payment = { payment } nav = { navMobile } />
289299 ) )
290300 . add ( 'Pay Bitcoin Confirm' , ( ) => (
291301 < PayBitcoinConfirm store = { store } payment = { payment } nav = { nav } />
292302 ) )
293303 . add ( 'Pay Bitcoin Confirm (Mobile)' , ( ) => (
294- < PayBitcoinConfirmMobile store = { store } payment = { payment } nav = { nav } />
304+ < PayBitcoinConfirmMobile store = { store } payment = { payment } nav = { navMobile } />
295305 ) )
296306 . add ( 'Pay Bitcoin Done' , ( ) => < PayBitcoinDone payment = { payment } nav = { nav } /> )
297307 . add ( 'Pay Bitcoin Done (Mobile)' , ( ) => (
298- < PayBitcoinDoneMobile payment = { payment } nav = { nav } />
308+ < PayBitcoinDoneMobile payment = { payment } nav = { navMobile } />
299309 ) )
300310 . add ( 'Invoice' , ( ) => < Invoice store = { store } invoice = { invoice } nav = { nav } /> )
301311 . add ( 'Invoice (Mobile)' , ( ) => (
302- < InvoiceMobile store = { store } invoice = { invoice } nav = { nav } />
312+ < InvoiceMobile store = { store } invoice = { invoice } nav = { navMobile } />
303313 ) )
304314 . add ( 'Invoice QR' , ( ) => (
305315 < InvoiceQR store = { store } invoice = { invoice } nav = { nav } />
306316 ) )
307317 . add ( 'Invoice QR (Mobile)' , ( ) => (
308- < InvoiceQRMobile store = { store } invoice = { invoice } nav = { nav } />
318+ < InvoiceQRMobile store = { store } invoice = { invoice } nav = { navMobile } />
309319 ) ) ;
310320
311321// set some dummy data
0 commit comments