Source

admin-bro-design-system/src/organisms/current-user-nav/current-user-nav-props.ts

/**
 * Action element passed to CurrentUserNavProps
 *
 * @memberof CurrentUserNav
 * @alias CurrentUserNavAction
 */
export type CurrentUserNavAction = {
  /** action label */
  label: string,
  /** action OnClick handler - taking event as a param */
  onClick?: (event: any) => void,
  /** Action icon */
  icon?: string,
  /** indicates if action is active */
  isActive?: string,
  /** href for an action */
  href?: string,
}

/**
 * Props passed to {@link CurrentUserNav} component
 *
 * @memberof CurrentUserNav
 * @alias CurrentUserNavProps
 */
export type CurrentUserNavProps = {
  /** User name */
  name: string,
  /** User title - visible below the name */
  title?: string
  /** Avatar url */
  avatarUrl?: string,
  /** Array of all the actions visible on hover */
  dropActions?: Array<CurrentUserNavAction>
  /** Array of all the actions visible by the user name */
  lineActions?: Array<CurrentUserNavAction>
}
SoftwareBrothers

Proudly built and maintained by SoftwareBrothers

Software House with a passion for both JavaScript and TypeScript.

See what we do See what we believe in

Proudly built and maintained by

SoftwareBrothers