1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Add select-hardware component to Storybook (#12227)

This commit is contained in:
Etienne Dusseault 2021-09-29 15:42:38 -03:00 committed by GitHub
parent acce73c943
commit b5103bf317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,29 @@
import React from 'react';
import { action } from '@storybook/addon-actions';
import SelectHardware from './select-hardware';
export default {
title: 'Connect Hardware Wallet',
id: __filename,
};
export const SelectHardwareComponent = () => {
return (
<SelectHardware
browserSupported
connectToHardwareWallet={(selectedDevice) =>
action(`Continue connect to ${selectedDevice}`)()
}
useLedgerLive
/>
);
};
export const BrowserNotSupported = () => {
return (
<SelectHardware
browserSupported={false}
connectToHardwareWallet={() => undefined}
useLedgerLive
/>
);
};