@veracity/vui 2.28.0 → 2.28.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "2.28.0",
3
+ "version": "2.28.1-beta.0",
4
4
  "description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
5
5
  "module": "./dist/esm/index.js",
6
6
  "main": "./dist/cjs/index.js",
@@ -9,6 +9,8 @@ export type MenuListProps = ListProps & {
9
9
  contentProps?: PopoverContentProps
10
10
  /** Ref passed to the inner PopoverContent. */
11
11
  contentRef?: RefObject<HTMLDivElement>
12
+ /** Maximum height of the list. */
13
+ maxH?: number
12
14
  /** Custom content displayed at the bottom of the panel */
13
15
  slotBottom?: ReactNode
14
16
  /** Custom content displayed at the top of the panel */
@@ -1,5 +1,3 @@
1
- import React from 'react'
2
-
3
1
  import { Box } from '../box'
4
2
  import { useStyleConfig, vui, VuiComponent } from '../core'
5
3
  import List from '../list'
@@ -10,8 +8,8 @@ import { MenuListProps } from './menu.types'
10
8
 
11
9
  /** Displays a list of menu items in a popover content element. */
12
10
  export const MenuList = vui<'ul', MenuListProps>((props, ref) => {
13
- const { className, contentProps, contentRef, ...rest } = props
14
- const { slotTop, slotBottom } = props
11
+ const { className, contentProps, contentRef, maxH, slotTop, slotBottom, ...rest } = props
12
+
15
13
  const styles = useStyleConfig('Menu', useMenuContext())
16
14
 
17
15
  return (
@@ -26,7 +24,7 @@ export const MenuList = vui<'ul', MenuListProps>((props, ref) => {
26
24
  w="100%"
27
25
  {...styles.list}
28
26
  {...rest}
29
- maxH={295}
27
+ maxH={maxH}
30
28
  />
31
29
  {slotBottom}
32
30
  </Box>