You may have noticed that you have been adding some custom classes to the components you created earlier. Let’s define some style rules for those classes in the src/App.scss file.

nano src/App.scss
Note: For more information about this, see the Create React App documentation.

nano src/App.js
src/App.scss

/* Declare some variables */
$base-color: #ced4da;
$light-background: lighten(desaturate($base-color, 50%), 12.5%);

.current-page {
  font-size: 1.5rem;
  vertical-align: middle;
}

.country-card-container {
  height: 60px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.country-name {
  font-size: 0.9rem;
}

.country-region {
  font-size: 0.7rem;
}

.current-page,
.country-name,
.country-region {
  line-height: 1;
}

// Override some Bootstrap pagination styles
ul.pagination {
  margin-top: 0;
  margin-bottom: 0;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);

  li.page-item.active {
    a.page-link {
      color: saturate(darken($base-color, 50%), 5%) !important;
      background-color: saturate(lighten($base-color, 7.5%), 2.5%) !important;
      border-color: $base-color !important;
    }
  }

  a.page-link {
    padding: 0.75rem 1rem;
    min-width: 3.5rem;
    text-align: center;
    box-shadow: none !important;
    border-color: $base-color !important;
    color: saturate(darken($base-color, 30%), 10%);
    font-weight: 900;
    font-size: 1rem;

    &:hover {
      background-color: $light-background;
    }
  }
}

import React, { Component } from 'react';
import Countries from 'countries-api';
import './App.scss';
import Pagination from './components/Pagination';
import CountryCard from './components/CountryCard';

Recommend

How To Build Custom Pagination with React Step 4 — Building the App Component

How To Build Custom Pagination with React Step 3 — Creating the Pagination Component

How To Build Custom Pagination with React Step 2 — Creating the CountryCard Component

How To Build Custom Pagination with React Step 1 — Setting Up the Project

How To Use the WordPress One-Click Install on DigitalOcean Step 6 — Locating Logins and Passwords

How To Use the WordPress One-Click Install on DigitalOcean Step 3 — Accessing the Droplet via SSH to Enable Configuration

sudo mkswap /swapfile

How To Add Swap on CentOS 7 Tweak Your Swap Settings (Optional) Cache Pressure

How To Add Swap on CentOS 7 Tweak Your Swap Settings (Optional) Swappiness

How To Add Swap on CentOS 7 Make the Swap File Permanent

How To Add Swap on CentOS 7 Enable a Swap File

How To Add Swap on CentOS 7 Create a Swap File

How To Add Swap on CentOS 7 Check Available Storage Space

How To Add Swap on CentOS 7 Check the System for Swap Information

Cara Menginstal Nginx pada Ubuntu 20.04 Langkah 5 – Menyiapkan Blok Server (Disarankan)

Cara Menginstal Nginx pada Ubuntu 20.04 Langkah 4 – Mengelola Proses Nginx

Cara Menginstal Nginx pada Ubuntu 20.04 Langkah 3 – Memeriksa Server Web Anda

Cara Menginstal Nginx pada Ubuntu 20.04 Langkah 2 – Menyesuaikan Firewall

Cara Menginstal Nginx pada Ubuntu 20.04 Langkah 1 – Menginstal Nginx

Comment ajouter Swap sur Ubuntu 20.04 Étape 6 - Réglage de vos paramètres swap Ajuster le réglage de la pression du cache

Comment ajouter Swap sur Ubuntu 20.04 Étape 6 - Réglage de vos paramètres swap Ajuster la propriété du swappiness

Comment ajouter Swap sur Ubuntu 20.04 Étape 5 - Rendre le fichier swap permanent

Comment ajouter Swap sur Ubuntu 20.04 Étape 4 - Activer le fichier Swap

Comment ajouter Swap sur Ubuntu 20.04 Étape 3 - Créer d’un fichier swap

Comment ajouter Swap sur Ubuntu 20.04 Étape 2 - Vérifier de l’espace disponible sur la partition du disque dur

Comment ajouter Swap sur Ubuntu 20.04 Étape 1 - Vérification du système d’information sur les swaps