Skip to content

Commit

Permalink
Merge pull request #5574 from chakra-ui/docs/show-hide-props
Browse files Browse the repository at this point in the history
docs(show-hide): adding props descriptions to Show / Hide components
  • Loading branch information
nikolovlazar committed Feb 14, 2022
2 parents c5eb9c0 + 5b27957 commit d24f935
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-dogs-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chakra-ui/media-query": patch
---

Added props descriptions to Show / Hide components
12 changes: 12 additions & 0 deletions packages/media-query/src/media-query.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,20 @@ if (__DEV__) {
}

export interface ShowProps {
/**
* A custom css media query that determines when the `children` are rendered.
* Will render `children` if that query resolves to `true`.
*/
breakpoint?: string
/**
* A value from the `breakpoints` section in the theme. Will render `children`
* from that breakpoint and below. Default breakpoint values: `sm`, `md`, `lg`, `xl`, `2xl`.
*/
below?: string
/**
* A value from the `breakpoints` section in the theme. Will render `children`
* from that breakpoint and above. Default breakpoint values: `sm`, `md`, `lg`, `xl`, `2xl`.
*/
above?: string
children?: React.ReactNode
}
Expand Down

1 comment on commit d24f935

@vercel
Copy link

@vercel vercel bot commented on d24f935 Feb 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.