github.com/argoproj/argo-cd/v2@v2.10.9/ui/src/app/applications/components/pod-logs-viewer/timestamps-toggle-button.tsx (about)

     1  import * as React from 'react';
     2  import {ToggleButton} from '../../../shared/components/toggle-button';
     3  
     4  // TimestampsToggleButton is a component that renders a toggle button that toggles timestamps.
     5  export const TimestampsToggleButton = ({
     6      timestamp,
     7      viewTimestamps,
     8      setViewTimestamps
     9  }: {
    10      timestamp?: string;
    11      viewTimestamps: boolean;
    12      setViewTimestamps: (value: boolean) => void;
    13  }) =>
    14      !timestamp && (
    15          <ToggleButton
    16              title='Show timestamps'
    17              onToggle={() => {
    18                  setViewTimestamps(!viewTimestamps);
    19              }}
    20              toggled={viewTimestamps}
    21              icon='clock'
    22          />
    23      );