import { Card , Colors , Icon } from "@blueprintjs/core" ; import { COLORS } from "constants/colors" ; import React from "react" ; import styled from "styled-components" ; import { IThemeProps } from "ui/containers/ThemeContainer" ; /** ===========================================================================
 * Validators List Components
 * ============================================================================
 */ export const ValidatorListCard = styled ( Card ) `
  padding: 8px;
  min-width: ${ ( props ) => props . theme . isDesktop ? "550px" : null };
` ; export const ValidatorRowBase = styled . div `
  padding: 6px;
  display: flex;
  align-items: center;
  flex-direction: row;
` ; export const StakingRow = styled ( ValidatorRowBase ) `
  height: 70px;
` ; export const StakingRowSummary = styled ( StakingRow ) `
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: ${ ( props ) => props . theme . isDarkTheme ? Colors . GRAY1 : Colors . GRAY5 };
` ; export const ValidatorRowExpandable = styled ( ValidatorRowBase ) `
  height: 70px;
  border-radius: ${ ( props ) => props . highlight ? 8 : 0 }px;
  border: ${ ( props ) => { const color = props . theme . isDarkTheme ? COLORS . CHORUS_MINT : COLORS . CELO ; return props . highlight ? `1px solid ${ color }` : "none" ; } };

  &:hover {
    cursor: pointer;
    background: red;
    background: ${ ( props ) => props . theme . isDarkTheme ? Colors . DARK_GRAY3 : Colors . LIGHT_GRAY3 };
  }
` ; export const ValidatorDetailRow = styled ( ValidatorRowBase ) `
  height: 35px;
  margin-top: 2px;
  margin-bottom: 2px;
` ; export const ValidatorDetails = styled . div `
  padding-top: 4px;
  padding-bottom: 4px;
  background: ${ ( props ) => props . theme . isDarkTheme ? Colors . DARK_GRAY3 : Colors . LIGHT_GRAY3 };
` ; export const ValidatorCapacityCircle = styled . div `
  border-radius: 50%;
  width: 14px;
  height: 14px;
  background: ${ ( { capacity } ) => { return capacity < 1 ? COLORS . ERROR : capacity < 5 ? "orange" : capacity < 10 ? COLORS . WARNING : COLORS . CHORUS_MINT ; } };
` ; export const RowItem = styled . div < { width ? : number ; } > `
  padding-left: 4px;
  padding-right: 4px;
  width: ${ props => ( props . width ? `${ props . width }px` : "auto" ) };
` ; export const RowItemHeader = styled ( RowItem ) `
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;

  &:hover {
    cursor: pointer;
  }
` ; export const Text = styled . p `
  margin: 0;
  text-align: left;
` ; export const SortFilterIcon = ( { active , ascending , } ) => { return active ? ( < Icon color = { COLORS . PRIMARY } icon = { ascending ? "caret-up" : "caret-down" } / > ) : null ; } ;