2021-09-29 20:42:38 +02:00
|
|
|
import React from 'react';
|
|
|
|
import { action } from '@storybook/addon-actions';
|
2023-01-20 16:14:40 +01:00
|
|
|
import { LedgerTransportTypes } 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
|
|
|
};
|
|
|
|
|
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}`)()
|
|
|
|
}
|
2023-01-20 16:14:40 +01:00
|
|
|
ledgerTransportType={LedgerTransportTypes.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}
|
2023-01-20 16:14:40 +01:00
|
|
|
ledgerTransportType={LedgerTransportTypes.live}
|
2021-09-29 20:42:38 +02:00
|
|
|
/>
|
|
|
|
);
|
|
|
|
};
|