First, create a CSS file in src/components/Instructions:

touch src/components/Instructions/Instructions.css
tutorial-03-component/src/components/Instructions/Instructions.js

import React, { Component } from 'react';
import './Instructions.css';
import emoji from './emoji.svg'

export default class Instructions extends Component {

  render() {
    return(
      <div className="instructions">
        <img alt="laughing crying emoji" src={emoji} />
        <p>Click on an emoji to view the emoji short name.</p>
      </div>
    )
  }
}
If you look inside each component, you’ll see the component code, CSS, test, and image files if they exist.

ls src/components/App
Save and close the file. Next, remove the instructions CSS from src/components/App/App.css.

nano src/components/App/App.css
Next, open the CSS file in your text editor:

nano src/components/Instructions/Instructions.css
Save and close the file. Finally, import the CSS in Instructions.js:

nano src/components/Instructions/Instructions.js
You have the root component index.js and the related CSS index.css next to the components/ directory and utility files such as serviceWorker.js and setupTests.js:

Outputcomponents              serviceWorker.js
index.css               setupTests.js
index.js
tutorial-03-component/src/components/Instructions/Instructions.css

.instructions {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.instructions img {
    width: 100px;
    height: 100px;
}
tutorial-03-component/src/components/App/App.css

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

button {
    font-size: 2em;
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
}

ul {
    display: flex;
    padding: 0;
}

li {
    margin: 0 20px;
    list-style: none;
    padding: 0;
}

Recommend

How To Create Custom Components in React Step 3 — Creating a Readable File Structure Updating import Paths

How To Create Custom Components in React Step 3 — Creating a Readable File Structure Moving Components to Individual Directories

How To Create Custom Components in React Step 3 — Creating a Readable File Structure Creating a Components Directory

How To Create Custom Components in React Step 3 — Creating a Readable File Structure

How To Create Custom Components in React Step 2 — Creating an Independent Component with React Classes

How To Create Custom Components in React Step 1 — Setting Up the React Project

How To Protect an Apache Server with Fail2Ban on Ubuntu 14.04 Conclusion Want to learn more? Join the DigitalOcean Community! Still looking for an answer?

How To Protect an Apache Server with Fail2Ban on Ubuntu 14.04 Testing Fail2Ban Policies

How To Protect an Apache Server with Fail2Ban on Ubuntu 14.04 Getting Info About Enabled Jails

How To Protect an Apache Server with Fail2Ban on Ubuntu 14.04 Implementing your Apache Jails

How To Protect an Apache Server with Fail2Ban on Ubuntu 14.04 Adjusting the General Settings within Fail2Ban Changing Defaults

How To Protect an Apache Server with Fail2Ban on Ubuntu 14.04 Adjusting the General Settings within Fail2Ban

How To Protect an Apache Server with Fail2Ban on Ubuntu 14.04 Install Fail2Ban

How To Protect an Apache Server with Fail2Ban on Ubuntu 14.04 Installing Apache and Configuring Password Authentication

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04 Step 4: Test PHP Processing on your Web Server

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04 Step 3: Install PHP Install PHP Modules

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04 Step 3: Install PHP

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04 Step 2: Install MySQL

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04 Step 1: Install Apache How To Find your Server’s Public IP Address

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04 Step 1: Install Apache

Ubuntu 20.04へのDocker Composeのインストールおよび使用方法 ステップ4 — Docker Composeコマンドに精通する

Ubuntu 20.04へのDocker Composeのインストールおよび使用方法 ステップ3 — Docker Composeを実行する

Ubuntu 20.04へのDocker Composeのインストールおよび使用方法 ステップ2 —docker-compose.ymlファイルをセットアップする

Ubuntu 20.04へのDocker Composeのインストールおよび使用方法 ステップ1— Docker Composeをインストールする

How To Set Up a Private Docker Registry on Ubuntu 14.04 Conclusion Want to learn more? Join the DigitalOcean Community! Still looking for an answer?

How To Set Up a Private Docker Registry on Ubuntu 14.04 Step 11 — Pull from Your Docker Registry

How To Set Up a Private Docker Registry on Ubuntu 14.04 Step 10 — Publish to Your Private Docker Registry