1.0.3 • Published 7 years ago

@ygpedroso/react-autohide v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

@ygpedroso/react-autohide

code style: prettier code linting: eslint code quality: jest MIT license Build Status

React component that autohides itself after the specified amount of milliseconds

Install

npm install --save @ygpedroso/react-autohide

or

yarn add @ygpedroso/react-autohide

Usage

import React, { Component } from 'react'

import AutoHide from '@ygpedroso/react-autohide'

class Example extends Component {
  render () {
    return (
      <AutoHide>
        My Content
      </AutoHide>
    )
  }
}

Available props

  • ms Amount of milliseconds to wait before hiding the component: (Type: Number, Default value: 1000)
  • children Required, content to be displayed and autohide: (Type Node)

Styling

By default the children component will be displayed inside a span element, with .autohide class and none styling what so ever:

But the styles can be modified by overriding this css class: 1. .autohide: Entire Component container.

License

@ygpedroso/react-autohide is MIT-licensed.

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago