GithubHelp home page GithubHelp logo

dit-test-tasks-2's Introduction

dit-test-tasks-2

##Task 1

Write a function in JavaScript that will strip quote characters from a string. An example usage of this function would be ensuring that a string which will be quoted in an article (such as in an editorial sidebar or testimonial block on a page) does not contain quotes in the string itself.

###Solution

Code in the /task-1 directory

##Task 2

Implement a React Tooltip component such that given any target element in a page, it will render a tooltip panel relative to the target element. Ideally the component should include some control over where the tooltip panel is positioned and what triggers it to open/close along with any other features you think would be useful for a tooltip to have.

Solution

There are React project in the /task-2 directory

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

You can see tooltip use cases.

In the src/components/Tooltip directory you can review Tooltip components code.

Example

<Tooltip content="Tooltip text" placement="top">
    <Button>Click Me</Button>
</Tooltip>

Available options

placement="top|right|bottom|left" - Tooltip direction, default value - top

content="Some text" - Tooltip content

triggers="hover click" - Tooltip trigger event, default - hover

dit-test-tasks-2's People

Contributors

azimhodzhaev avatar

Watchers

akb 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.