ghost-portal/packages/react-components/src/ButtonCancel.tsx
Marcin Żółkiewski be7e293d28
Expose signed transactions (#2203)
* sign offline WIP

* signing transactions from extrinsics screen

* signing tx from accounts screen

* added translations

* removed unnecessary value

* removed console logs

* removed unused import

* used new signAsync method

* fixed types

* removed unused imports

* added missing translations

* code review changes

* fixed signing with local account

* added sign toggle

* improvements for QR
2020-01-31 16:13:56 +01:00

33 lines
817 B
TypeScript

// Copyright 2017-2020 @polkadot/react-components authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import React from 'react';
import Button from './Button';
import { useTranslation } from './translate';
interface Props {
className?: string;
isDisabled?: boolean;
label?: string;
onClick: () => void;
tabIndex?: number;
}
export default function ButtonCancel ({ className, isDisabled, label, onClick, tabIndex }: Props): React.ReactElement<Props> {
const { t } = useTranslation();
return (
<Button
className={className}
icon='cancel'
isDisabled={isDisabled}
isNegative
label={label || t('Cancel')}
onClick={onClick}
tabIndex={tabIndex}
/>
);
}