Comparing version 0.0.1-alpha.1 to 1.0.0
@@ -7,4 +7,4 @@ # Changelog | ||
## [Unreleased] | ||
## [1.0.0] | ||
### Added | ||
- Initial Release |
{ | ||
"name": "app-bar", | ||
"version": "0.0.1-alpha.1", | ||
"version": "1.0.0", | ||
"description": "An app bar for React that stays out of your way", | ||
@@ -5,0 +5,0 @@ "licence": "MIT", |
@@ -12,2 +12,52 @@ # app-bar | ||
Also known as a Header, a Navigation Bar, or a Navbar. I chose App Bar because it was available on npm. | ||
Also known as a Header, a Navigation Bar, or a Navbar. I chose App Bar because it was available on npm. | ||
## Usage | ||
Basic usage: | ||
```javascript | ||
import React from 'react'; | ||
import { css } from 'emotion'; | ||
import Navigation from 'app-bar'; | ||
import { HamburgerMenu, Logo } from './components'; | ||
... | ||
const styles = css` | ||
background-color: white; | ||
box-shadow: ${open ? 'none' : '0 1px 2px rgba(0, 0, 0, 0.08)'}; | ||
height: 64px; | ||
`; | ||
... | ||
<Navigation className={styles} disabled={open}> | ||
<Logo /> | ||
<HamburgerMenu open={open} /> | ||
</Navigation> | ||
``` | ||
### Styling | ||
The `app-bar` comes with very little defaults, and should be styled by supplying it with a `className` property that is attached some CSS. | ||
The `<AppBar />` component is `<div />` element with the following inline styles: | ||
```css | ||
display: block; | ||
position: fixed; | ||
top: 0; | ||
width: 100%; | ||
``` | ||
In other words, `<AppBar />` is a fixed full-width element at the top of your screen. The only functionality is that `<AppBar />` will move out the viewport when scrolling down, and back in when scrolling up. | ||
### Disabling | ||
If you want to disable `<AppBar />`'s behaviour, supply the `disabled` prop. When disabled, `<AppBar />` will simply stick to the top of the screen. | ||
### Ref | ||
If you need to access the dom element, you can supply a function via the `innerRef` prop. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
12319
7
153
1
62
0
1