* Playthrough with top navigation * Sycky, but navigation works... * Adjust * grouping * It works, but is not great * Cleanups * Cleanups * hover color * Highlights * Highlights, part 2 * Background to body * Small adjustments (size, items) * Localize Modal/route switching * Remove light/full mode * Flatter single-entry menus * Adjustments for single-enrties (e.g. Kulupu) * Display NodeInfo * Misc * Content & Tabs sizing * Tab counters as bubbles * Alignment * Tabs styling * Adjust font color to defaults * Small tabs menu color adjustments * ... the previous, again, adjusted * Display Wiki/Github links * ar motions * Adjust Endpoints location * Ensure content grows to available height * Adjust tabs * Menu background adjustment * Adjust popup colors * Adjust highlights * Sligh breathing room * Adaptive header background * 2/3 * Adaptive is ok... for now. * Back to black... erm, gray * Lighten * Touchups. Stop playin, it is ok... * Sides readability * Cleanups. * Adjust. * Overall adjustments (theme). Fix Tag yellow. * Ok. Done. * Ship it.
26 lines
750 B
TypeScript
26 lines
750 B
TypeScript
// Copyright 2017-2020 @polkadot/react-query 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 { useApi } from '@polkadot/react-hooks';
|
|
|
|
interface Props {
|
|
children?: React.ReactNode;
|
|
className?: string;
|
|
label?: React.ReactNode;
|
|
}
|
|
|
|
function NodeVersion ({ children, className = '', label }: Props): React.ReactElement<Props> {
|
|
const { systemVersion } = useApi();
|
|
const displayVersion = systemVersion.split('-').filter((_, index) => index <= 1).join('-');
|
|
|
|
return (
|
|
<div className={className}>
|
|
{label || ''}{displayVersion}{children}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default React.memo(NodeVersion);
|