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

For the test, you need to change the width of the screen, the inscription "Home" from the button should disappear

```jsx example
const media = useMedia()
const props = {}
if (media.tablet) props.children = 'Home'
return (
  <Button
    icon={faHome}
    onPress={()=> alert('For testing, follow the described instructions')}
    {...props}
  />
)
```
