app/components/Button/buttonStyles.js

import { css } from 'styled-components';

const buttonStyles = css`
  /* ... */
  border: 2px solid #41addd;
  color: #41addd;

  /* ... */
`;

export default buttonStyles;
Inserting a simple prop into the template literal will allow us to have a different style in a component by selecting the color based on the prop value:

const buttonStyles = css`
  /* ... */

  border: 2px solid ${(props) => props.gray ? 'darkgray' : '#41addd'};
  color: ${(props) => props.gray ? 'darkgray' : '#41addd'};

  /* ... */
`;
/app/components/Header/HeaderLink.js

import { Link } from 'react-router-dom';
import styled from 'styled-components';

export default styled(Link)`
  /* ... */
  border: 2px solid #41ADDD;
  color: #41ADDD;

  /* ... */
`;
/app/components/Header/GrayHeaderLink.js

import styled from 'styled-components';
import HeaderLink from './HeaderLink';

const GrayHeaderLink = styled(HeaderLink)`
  color: darkgray;
  border: 2px solid darkgray;
`;
/app/components/Button/StyledButton.js

import styled from 'styled-components';

import buttonStyles from './buttonStyles';

const StyledButton = styled.button`${buttonStyles}`;

export default StyledButton;
and now use this component in your JSX, from:

<NavBar>
 <HeaderLink to="/">
   {/* ...children */}
 </HeaderLink>

 <HeaderLink to="/features">
   {/* ...children */}
 </HeaderLink>
</NavBar>
to:

<NavBar>
 <GrayHeaderLink to="/">
   {/* ...children */}
 </GrayHeaderLink>

 <GrayHeaderLink to="/features">
   {/* ...children */}
 </GrayHeaderLink>
</NavBar>
Now you can make the button grey by just writing:

<StyledButton gray />
Try setting a custom max-width to 500px:

const AppWrapper = styled.div`
  max-width: 500px;
  /* ... */
`;

Recommend

styled-components, the Modern Way to Handle CSS in React Customize the Components

styled-components, the Modern Way to Handle CSS in React It Makes CSS Easier and Better

styled-components, the Modern Way to Handle CSS in React It’s Just CSS

styled-components, the Modern Way to Handle CSS in React Easy to Get Started

How To Create a SSL Certificate on nginx for Ubuntu 12.04 Step Six—Activate the Virtual Host

How To Create a SSL Certificate on nginx for Ubuntu 12.04 Step Five—Set Up the Certificate

How To Create a SSL Certificate on nginx for Ubuntu 12.04 Step Four— Sign your SSL Certificate

How To Create a SSL Certificate on nginx for Ubuntu 12.04 Step Three—Remove the Passphrase

How To Create a SSL Certificate on nginx for Ubuntu 12.04 Step Two—Create the Server Key and Certificate Signing Request

How To Create a SSL Certificate on nginx for Ubuntu 12.04 Step One—Create a Directory for the Certificate

How To Create a SSL Certificate on nginx for Ubuntu 12.04 Set Up

Добавление области подкачки на Ubuntu 20.04 Шаг 6 — Изменение настроек подкачки Изменение настроек нагрузки кэш-памяти

Добавление области подкачки на Ubuntu 20.04 Шаг 6 — Изменение настроек подкачки Настройка параметра Swappiness

Добавление области подкачки на Ubuntu 20.04 Шаг 5 — Сделать файл подкачки постоянным

Добавление области подкачки на Ubuntu 20.04 Шаг 4 — Активация файла подкачки

Добавление области подкачки на Ubuntu 20.04 Шаг 3 — Создание файла подкачки

Добавление области подкачки на Ubuntu 20.04 Шаг 2 — Проверка свободного пространства в разделе жесткого диска

Добавление области подкачки на Ubuntu 20.04 Шаг 1 — Проверка информации о подкачке в системе

Containerizing a Ruby on Rails Application for Development with Docker Compose Conclusion Tutorial Series: Rails on Containers Still looking for an answer?

Containerizing a Ruby on Rails Application for Development with Docker Compose Step 5 — Testing the Application

Containerizing a Ruby on Rails Application for Development with Docker Compose Step 4 — Defining Services with Docker Compose

Containerizing a Ruby on Rails Application for Development with Docker Compose Step 3 — Writing the Dockerfile and Entrypoint Scripts

Containerizing a Ruby on Rails Application for Development with Docker Compose Step 2 — Configuring the Application to Work with PostgreSQL and Redis

Containerizing a Ruby on Rails Application for Development with Docker Compose Step 1 — Cloning the Project and Adding Dependencies

Understanding Queries in GraphQL Directives

Understanding Queries in GraphQL Fragments

Understanding Queries in GraphQL Variables

Understanding Queries in GraphQL Operation Syntax

Understanding Queries in GraphQL Aliases