github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ui/ccl/src/views/clusterviz/components/nodeOrLocality/labels.tsx (about)

     1  // Copyright 2018 The Cockroach Authors.
     2  //
     3  // Licensed as a CockroachDB Enterprise file under the Cockroach Community
     4  // License (the "License"); you may not use this file except in compliance with
     5  // the License. You may obtain a copy of the License at
     6  //
     7  //     https://github.com/cockroachdb/cockroach/blob/master/licenses/CCL.txt
     8  
     9  import React from "react";
    10  import { DARK_BLUE, MAIN_BLUE } from "src/views/shared/colors";
    11  
    12  interface LabelsProps {
    13    label: string;
    14    subLabel: string;
    15    tooltip?: string;
    16  }
    17  
    18  export class Labels extends React.Component<LabelsProps> {
    19  
    20    render() {
    21      return (
    22        <g
    23          fontFamily="Lato-Bold, Lato"
    24          fontSize="14"
    25          fontWeight="bold"
    26          letterSpacing="1"
    27          transform="translate(50 22)"
    28        >
    29          <title>{this.props.tooltip}</title>
    30          <text fill={DARK_BLUE}>
    31            {this.props.label}
    32          </text>
    33          <text fill={MAIN_BLUE} y="20">
    34            {this.props.subLabel}
    35          </text>
    36        </g>
    37      );
    38    }
    39  
    40  }