github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ui/src/views/shared/components/panelSection/index.tsx (about)

     1  // Copyright 2018 The Cockroach Authors.
     2  //
     3  // Use of this software is governed by the Business Source License
     4  // included in the file licenses/BSL.txt.
     5  //
     6  // As of the Change Date specified in that file, in accordance with
     7  // the Business Source License, use of this software will be governed
     8  // by the Apache License, Version 2.0, included in the file
     9  // licenses/APL.txt.
    10  
    11  import React from "react";
    12  
    13  import "./panels.styl";
    14  
    15  export class PanelSection extends React.Component {
    16    render() {
    17      return (
    18        <table className="panel-section">
    19          <tbody>
    20            { this.props.children }
    21          </tbody>
    22        </table>
    23      );
    24    }
    25  }
    26  
    27  export class PanelTitle extends React.Component {
    28    render() {
    29      return (
    30        <tr>
    31          <th colSpan={2} className="panel-title">{ this.props.children }</th>
    32        </tr>
    33      );
    34    }
    35  }
    36  
    37  export class PanelPair extends React.Component {
    38    render() {
    39      return (
    40        <tr className="panel-pair">
    41          { this.props.children }
    42        </tr>
    43      );
    44    }
    45  }
    46  
    47  export class Panel extends React.Component {
    48    render() {
    49      return (
    50        <td className="panel">
    51          { this.props.children }
    52        </td>
    53      );
    54    }
    55  }