How to use @build-tracker/comparator - 10 common examples

To help you get started, we’ve selected a few @build-tracker/comparator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ComparisonTable.js View on Github external
key={cellIndex}
            linked
            onToggle={this._handleToggleAllArtifacts}
            style={cellStyles && [...cellStyles, styles.stickyColumnStickyHeader]}
          />
        );
      case CellType.TEXT:
        return (
          
        );
      case CellType.TOTAL_DELTA:
      case CellType.DELTA: {
        // $FlowFixMe
        const deltaCell = (cell: BT$DeltaCellType);
        return (
          
        );
      }
      case CellType.TOTAL: {
github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ArtifactRow.js View on Github external
switch (cell && cell.type) {
      case CellType.ARTIFACT:
        return (
          
        );
      case CellType.DELTA: {
        // $FlowFixMe
        const deltaCell = (cell: BT$DeltaCellType);
        return (
          
        );
      }
      case CellType.TOTAL: {
        // $FlowFixMe
github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ComparisonTable.js View on Github external
// $FlowFixMe
        const deltaCell = (cell: BT$DeltaCellType);
        return (
          
        );
      }
      case CellType.TOTAL: {
        // $FlowFixMe
        const totalCell = (cell: BT$TotalCellType);
        return (
          
        );
      }
      default:
        return null;
    }
github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ArtifactRow.js View on Github external
case CellType.DELTA: {
        // $FlowFixMe
        const deltaCell = (cell: BT$DeltaCellType);
        return (
          
        );
      }
      case CellType.TOTAL: {
        // $FlowFixMe
        const totalCell = (cell: BT$TotalCellType);
        return (
          
        );
      }
      default:
        return null;
github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ArtifactRow.js View on Github external
_renderCell = (cell: BT$BodyCellType, columnIndex: number, artifactName: string, isHovered: boolean) => {
    const { color, isActive, onCellClick, onToggleArtifact, valueType } = this.props;
    const hoverColor = hsl(color);
    hoverColor.s = 0.7;
    hoverColor.l = 0.95;

    switch (cell && cell.type) {
      case CellType.ARTIFACT:
        return (
          
        );
      case CellType.DELTA: {
        // $FlowFixMe
        const deltaCell = (cell: BT$DeltaCellType);
        return (
github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ComparisonTable.js View on Github external
_renderTotalCell = (
    cell: BT$BodyCellType,
    cellIndex: number,
    rowIndex?: number,
    cellText?: string,
    style?: mixed
  ) => {
    const { activeArtifactNames, artifactNames, valueType } = this.props;
    // $FlowFixMe
    const text = cellText || (cell.hasOwnProperty('text') ? cell.text : '');
    const cellStyles = rowIndex ? [styles.header, { top: getHeaderTopPos(rowIndex) }, style] : undefined;
    switch (cell.type) {
      case CellType.ARTIFACT:
        return (
          
        );
      case CellType.TEXT:
        return (
github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ComparisonTable.js View on Github external
color={theme.colorMidnight}
            key={cellIndex}
            linked
            onToggle={this._handleToggleAllArtifacts}
            style={cellStyles && [...cellStyles, styles.stickyColumnStickyHeader]}
          />
        );
      case CellType.TEXT:
        return (
          
        );
      case CellType.TOTAL_DELTA:
      case CellType.DELTA: {
        // $FlowFixMe
        const deltaCell = (cell: BT$DeltaCellType);
        return (
          
        );
      }
github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ComparisonTable.js View on Github external
_renderHeaderCell = (cell: BT$HeaderCellType, cellIndex: number) => {
    const { onRemoveBuild, onShowBuildInfo } = this.props;
    switch (cell.type) {
      case CellType.REVISION_HEADER:
        // $FlowFixMe
        return (
          
        );
      case CellType.REVISION_DELTA_HEADER:
        // $FlowFixMe
        return ;
      default:
        return ;
    }
  };
github paularmstrong / build-tracker / packages / app / src / components / ComparisonTable / ComparisonTable.js View on Github external
_renderHeaderCell = (cell: BT$HeaderCellType, cellIndex: number) => {
    const { onRemoveBuild, onShowBuildInfo } = this.props;
    switch (cell.type) {
      case CellType.REVISION_HEADER:
        // $FlowFixMe
        return (
          
        );
      case CellType.REVISION_DELTA_HEADER:
        // $FlowFixMe
        return ;
      default:
        return ;
    }
  };
github paularmstrong / build-tracker / src / app / src / components / ComparisonTable / __tests__ / DeltaCell.text.tsx View on Github external
test('shows formatted bytes and delta in the title', () => {
      const wrapper = shallow(
        
      );

      expect(wrapper.find(Td).prop('title')).toEqual('-134 bytes (-50.0%)');
    });