ghost-portal/packages/react-params/src/Param/Hash.tsx
Jaco Greeff 9beece08c9
Allow optional params in state/toolbox (#1554)
* Allow optional params in state/toolbox

* RPC calls work with optional
2019-08-28 17:30:11 +02:00

34 lines
943 B
TypeScript

// Copyright 2017-2019 @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 { Props } from '../types';
import React from 'react';
import BaseBytes from './BaseBytes';
export default class Hash extends React.PureComponent<Props> {
public render (): React.ReactNode {
const { className, defaultValue, isDisabled, isError, isOptional, label, name, onChange, onEnter, style, type, withLabel } = this.props;
return (
<BaseBytes
className={className}
defaultValue={defaultValue}
isDisabled={isDisabled}
isError={isError}
isOptional={isOptional}
label={label}
length={32}
name={name}
onChange={onChange}
onEnter={onEnter}
style={style}
type={type}
withLabel={withLabel}
/>
);
}
}