Git Product home page Git Product logo

aftab-texteditor-master's Introduction

The goal of this coding exam is to quickly get you off the ground with Dynamic Styling Using Styled Components.

Refer to the image below:


text-editor-output

Design Files

Click to view

Set Up Instructions

Click to view
  • Download dependencies by running npm install
  • Start up the app using npm start

Completion Instructions

Functionality to be added

The app must have the following functionalities

  • Initially, #f1f5f9 color is applied to all the three bold icon, italic icon, underline icon buttons

  • When the bold icon button is clicked,

    • It will change to an active state by applying the #faff00 color
    • The bold font-weight is applied to the text in the HTML textarea element
    • If the bold icon button is already in the active state,
      • The respective button should be inactive by applying #f1f5f9 color
      • The normal font-weight is applied to the text in the HTML textarea element
  • When the italic icon button is clicked,

    • It will change to an active state by applying the #faff00 color
    • The italic font-style is applied to the text in the HTML textarea element
    • If the italic icon button is already in the active state,
      • The respective button should be inactive by applying #f1f5f9 color
      • The normal font-style is applied to the text in the HTML textarea element
  • When the underline icon button is clicked,

    • It will change to an active state by applying the #faff00 color
    • The underline text-decoration is applied to the text in the HTML textarea element
    • If the underline icon button is already in the active state,
      • The respective button should be inactive by applying #f1f5f9 color
      • The normal text-decoration is applied to the text in the HTML textarea element
  • More than one button can be active at a time and more than one style can be applied to the text in the HTML textarea element

Important Note

Click to view

The following instructions are required for the tests to pass

  • VscBold, GoItalic and AiOutlineUnderline icons from react-icons should be used for bold, italic and underline buttons respectively
  • Wrap the VscBold component with an HTML button element and add the data-testid attribute value as bold
  • Wrap the GoItalic component with an HTML button element and add the data-testid attribute value as italic
  • Wrap the AiOutlineUnderline component with an HTML button element and add the data-testid attribute value as underline

Example:

<Button data-testid="bold">
  <VscBold size={25} />
</Button>
  • Use styled-components for styling elements

Resources

Image URLs

Colors
Hex: #25262c
Hex: #1b1c22
Hex: #f8fafc
Hex: #334155
Hex: #f1f5f9
Hex: #faff00
Hex: #cbd5e1

Font-families
  • Roboto

Things to Keep in Mind

  • All components you implement should go in the src/components directory.

aftab-texteditor-master's People

Contributors

aftab-pathan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.