2021-09-29 20:42:38 +02:00
|
|
|
import React from 'react';
|
|
|
|
import { action } from '@storybook/addon-actions';
|
2021-10-21 21:17:03 +02:00
|
|
|
import { LEDGER_TRANSPORT_TYPES } from '../../../../shared/constants/hardware-wallets';
|
2021-09-29 20:42:38 +02:00
|
|
|
import SelectHardware from './select-hardware';
|
|
|
|
|
|
|
|
export default {
|
2021-12-01 20:27:57 +01:00
|
|
|
title: 'Pages/CreateAccount/ConnectHardware/SelectHardware',
|
2021-09-29 20:42:38 +02:00
|
|
|
id: __filename,
|
|
|
|
};
|
|
|
|
|
2021-12-01 20:27:57 +01:00
|
|
|
export const DefaultStory = () => {
|
2021-09-29 20:42:38 +02:00
|
|
|
return (
|
|
|
|
<SelectHardware
|
|
|
|
browserSupported
|
|
|
|
connectToHardwareWallet={(selectedDevice) =>
|
|
|
|
action(`Continue connect to ${selectedDevice}`)()
|
|
|
|
}
|
2021-10-21 21:17:03 +02:00
|
|
|
ledgerTransportType={LEDGER_TRANSPORT_TYPES.LIVE}
|
2021-09-29 20:42:38 +02:00
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|
2021-12-01 20:27:57 +01:00
|
|
|
|
|
|
|
DefaultStory.storyName = 'Default';
|
|
|
|
|
2021-09-29 20:42:38 +02:00
|
|
|
export const BrowserNotSupported = () => {
|
|
|
|
return (
|
|
|
|
<SelectHardware
|
|
|
|
browserSupported={false}
|
|
|
|
connectToHardwareWallet={() => undefined}
|
2021-10-21 21:17:03 +02:00
|
|
|
ledgerTransportType={LEDGER_TRANSPORT_TYPES.LIVE}
|
2021-09-29 20:42:38 +02:00
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|