Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @react-md/divider

Index

Type aliases

DividerElement: HTMLHRElement | HTMLDivElement

Variables

Divider: ForwardRefExoticComponent<DividerProps & RefAttributes<DividerElement>> = ...
VerticalDivider: ForwardRefExoticComponent<VerticalDividerProps & RefAttributes<HTMLDivElement>> = ...

This component is used to create a vertical divider based on a parent element's height. This is really only needed when the parent element has no defined height. If there is a defined height, this component is not worth much as the height can be computed in css as normal. This really just fixes the issue that the height would be set to auto (which computes to 0 most of the time) when it is not set on a parent element.

Functions

  • This is a small hook that is used to automatically create a vertical divider based on the computed height of its parent element.

    remarks

    @since 5.0.0 The hook accepts an object instead of using multiple params and uses a generic for the HTMLElement type.

    Type parameters

    • E: HTMLElement

    Parameters

    • maxHeight: VerticalDividerHookOptions<E>

      The max height for the vertical divider. When the value is between 0 and 1, it will be used as a percentage. Otherwise the smaller value of parent element height and this will be used.

    Returns VerticalDividerHeight<E>

Generated using TypeDoc