ghost-portal/packages/ui-reactive/src/NodeVersion.tsx
Jaco Greeff 338bd517a0
Remove /index imports (swap to bare) (#814)
* Remove /index imports (swap to bare)

* Bump deps
2019-03-14 10:45:58 +01:00

33 lines
873 B
TypeScript

// Copyright 2017-2019 @polkadot/ui-reactive 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 { BareProps, CallProps } from '@polkadot/ui-api/types';
import React from 'react';
import { Text } from '@polkadot/types';
import { withCall } from '@polkadot/ui-api';
type Props = BareProps & CallProps & {
children?: React.ReactNode,
label?: string,
system_version?: Text
};
class NodeVersion extends React.PureComponent<Props> {
render () {
const { children, className, label = '', style, system_version = '-' } = this.props;
return (
<div
className={className}
style={style}
>
{label}{system_version.toString()}{children}
</div>
);
}
}
export default withCall('rpc.system.version')(NodeVersion);