How to use the @grafana/ui.withTheme function in @grafana/ui

To help you get started, we’ve selected a few @grafana/ui 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 grafana / grafana / public / app / features / explore / ExploreGraphPanel.tsx View on Github external
collapsible
            isOpen={showingGraph}
            loading={loading}
            onToggle={this.onClickGraphButton}
          >
            {this.renderGraph()}
          
        )}

        {!showPanel && this.renderGraph()}
      
    );
  }
}

export const ExploreGraphPanel = withTheme(UnThemedExploreGraphPanel);
ExploreGraphPanel.displayName = 'ExploreGraphPanel';
github grafana / grafana / public / app / features / admin / UserOrgs.tsx View on Github external
confirmVariant="danger"
                onClick={this.onOrgRemoveClick}
                onCancel={this.onCancelClick}
                onConfirm={this.onOrgRemove}
              >
                Remove from organisation
              
            
          
        )}
      
    );
  }
}

const OrgRow = withTheme(UnThemedOrgRow);

const getAddToOrgModalStyles = stylesFactory(() => ({
  modal: css`
    width: 500px;
  `,
  buttonRow: css`
    text-align: center;
  `,
}));

interface AddToOrgModalProps {
  isOpen: boolean;
  onOrgAdd(orgId: number, role: string): void;
  onDismiss?(): void;
}
github grafana / grafana / public / app / features / dashboard / components / DashNav / DashNavTimeControls.tsx View on Github external
onMoveForward={this.onMoveForward}
          onZoom={this.onZoom}
        />
        
      
    );
  }
}

export const DashNavTimeControls = withTheme(UnthemedDashNavTimeControls);
github GridProtectionAlliance / openHistorian / Source / Applications / openHistorian / openHistorian / Grafana / public / app / features / explore / ExploreGraphPanel.tsx View on Github external
collapsible
            isOpen={showingGraph}
            loading={loading}
            onToggle={this.onClickGraphButton}
          >
            {this.renderGraph()}
          
        )}

        {!showPanel && this.renderGraph()}
      
    );
  }
}

export const ExploreGraphPanel = withTheme(UnThemedExploreGraphPanel);
ExploreGraphPanel.displayName = 'ExploreGraphPanel';
github grafana / grafana / public / app / features / explore / LiveLogs.tsx View on Github external
Stop Live
          
        
      
    );
  }
}

export const LiveLogsWithTheme = withTheme(LiveLogs);
github GridProtectionAlliance / openHistorian / Source / Applications / openHistorian / openHistorian / Grafana / public / app / features / explore / LiveLogs.tsx View on Github external
<button>
            <i>
            &nbsp; Exit live mode
          </i></button><i>
          {isPaused || (
            <span>
              Last line received:  ago
            </span>
          )}
        
      
    );
  }
}

export const LiveLogsWithTheme = withTheme(LiveLogs);
</i>
github GridProtectionAlliance / openHistorian / Source / Applications / openHistorian / openHistorian / Grafana / public / app / features / explore / Typeahead.tsx View on Github external
{showDocumentation &amp;&amp; (
          
        )}
      
    );
  }
}

export const TypeaheadWithTheme = withTheme(Typeahead);

interface PortalProps {
  index?: number;
  isOpen: boolean;
  origin: string;
  style: string;
}

class Portal extends React.PureComponent {
  node: HTMLElement;

  constructor(props: PortalProps) {
    super(props);
    const { index = 0, origin = 'query', style } = props;
    this.node = document.createElement('div');
    this.node.setAttribute('style', style);
github GridProtectionAlliance / openHistorian / Source / Applications / openHistorian / openHistorian / Grafana / public / app / features / dashboard / components / DashNav / DashNavTimeControls.tsx View on Github external
onMoveForward={this.onMoveForward}
          onZoom={this.onZoom}
        /&gt;
        
      
    );
  }
}

export const DashNavTimeControls = withTheme(UnthemedDashNavTimeControls);