Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@brightleaf/react-hooks

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brightleaf/react-hooks - npm Package Compare versions

Comparing version 0.13.0 to 0.14.0

lib/use-styles.js

16

lib/index.js

@@ -90,2 +90,14 @@ "use strict";

});
Object.defineProperty(exports, "useStyles", {
enumerable: true,
get: function () {
return _useStyles.default;
}
});
Object.defineProperty(exports, "useStyleSheet", {
enumerable: true,
get: function () {
return _useStylesheet.default;
}
});
Object.defineProperty(exports, "useTitle", {

@@ -132,2 +144,6 @@ enumerable: true,

var _useStyles = _interopRequireDefault(require("./use-styles"));
var _useStylesheet = _interopRequireDefault(require("./use-stylesheet"));
var _useTitle = _interopRequireDefault(require("./use-title"));

@@ -134,0 +150,0 @@

2

package.json
{
"name": "@brightleaf/react-hooks",
"version": "0.13.0",
"version": "0.14.0",
"description": "Useful react hooks",

@@ -5,0 +5,0 @@ "files": [

@@ -19,3 +19,7 @@ # Brightleaf React Hooks

* `useTitle` - Hook to manipulate the page title
* `useStyles` - Hook to add CSS to the page
* `useStyleSheet` - Hook to add a css file to the page
[Examples](https://brightleaf.github.io/react-hooks/examples/#/)
## Async Hook

@@ -69,2 +73,3 @@

```
## Keypress Hook

@@ -89,3 +94,2 @@

}
```

@@ -323,6 +327,54 @@

Hover Over Me
</button>
</div>
</div>
);
}
```
## Style Hook
```javascript
import React from 'react'
import { useStyles } from '@brightleaf/react-hooks'
export default () => {
useStyles(`
html,
body {
font-family: 'Open Sans';
}
div {
padding: 5px;
border: 1px solid #ccc;
}
`)
return (
<div>
<div>
Something
</div>
</div>
);
}
```
## StyleSheet Hook
```javascript
import React from 'react'
import { useStyleSheet } from '@brightleaf/react-hooks'
export default () => {
useStyleSheet(
'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'
)
useStyleSheet('https://fonts.googleapis.com/css?family=Open+Sans')
return (
<div>
...
</div>
);
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc