import useMedia from '../hooks/useMedia'
import Button from './../components/Button/'
import { faHome } from '@fortawesome/free-solid-svg-icons'

# useMedia

Allows you to determine a device resolution. Hook returns an object where key is media breakpoint (`wide`, `desktop`, `tablet`) and value is `true/false`. For example, using this hook you can create media queries.

```jsx
import { useMedia } from 'startupjs/ui'
```

## Media query example

```jsx example
const media = useMedia()
const props = {}
if (media.tablet) props.children = 'Home'
return (
  <Button icon={faHome} {...props}/>
)
```
