Skip to content

Commit 6fc21ae

Browse files
author
Federico Zivolo
committed
some docs
1 parent 5531a47 commit 6fc21ae

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@ And if you need some more power, you can invert the behavior of a selector:
4242
<Matches sm={false}>I match only when `sm` isn't matching</Matches>
4343
```
4444
45+
## Docs
46+
47+
The `queries` property is an object with a list of properties of your choice,
48+
you can name them how you prefer, for instance, you could have `sm` or `small` or
49+
`verySmallMatcher`.
50+
Each property contains an object with one or more expressions..
51+
52+
So far, the supported expressions are: `maxWidth`, `minWidth`, `maxHeight` and
53+
`minHeight`.
54+
55+
Once you have defined your element queries, you can use the `<Matches />` component
56+
to conditionally render a piece of UI.
57+
Simply add to it one or more element queries names to tell it to display its content
58+
when at least one of the matches the given expressions.
59+
60+
4561
# Credits
4662
4763
Full credits to the original idea to [@souporserious](https://github.com/souporserious).

0 commit comments

Comments
 (0)