New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@synerise/ds-menu

Package Overview
Dependencies
Maintainers
1
Versions
243
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synerise/ds-menu

Menu UI Component for the Synerise Design System

  • 0.5.12
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
612
increased by52.24%
Maintainers
1
Weekly downloads
 
Created
Source

id: menu title: Menu

Menu UI Component

Installation

npm i @synerise/ds-menu
or
yarn add @synerise/ds-menu

Usage

import Menu from '@synerise/ds-menu'

const items = [
  {
    text: 'Item 1',
    copyable: true,
    copyHint: 'Copy to clipboard',
    copyValue: 'Item 1',
    copyTooltip: 'Copied Item 1!'
  },
 {
    text: 'Item 2',
    copyable: true,
    copyHint: 'Copy to clipboard',
    copyValue: 'Item 2',
    copyTooltip: 'Copied Item 2!'
  },
];

// Render using dataSource passed as prop
<Menu  dataSource={items} />

// Render using dataSource mapping to Menu.Item
<Menu>
    {items.map(item => <Menu.Item {...item}/>}
</Menu>

Demo

Menu

PropertyDescriptionTypeDefault
dataSourceArray of items to display in menuMenuItemProps[]-
orderedDetermines if items should be displayed with index prefix (starting from 01)booleanfalse
orderedDetermines if items should be displayed with index prefix (starting from 01)booleanfalse

MenuItemProps

PropertyDescriptionTypeDefault
textText displayed inside the itemstring / React.ReactNode-
parentBoolean to display arrow for parent itembooleanfalse
prefixelPrefix elementReact.ReactNode-
prefixVisibilityTriggerTrigger for displaying the prefix element'default' / 'hover''default'
suffixelSuffix elementReact.ReactNode-
suffixVisibilityTriggerTrigger for displaying the suffix element'default' / 'hover''default'
disabledDisable an item elementbooleanfalse
descriptionAdditional description displayed inside the itemstring / React.ReactNode
subMenuArray of nested itemsMenuItemProps[]
copyableBoolean to enable option of copying the value to the clipboardbooleanfalse
copyHintText displayed on hovering copyable itemstring
copyValueValue to be copied to clipboard when copyable item is clickedstring
copyTooltipTooltip to be displayed when copyable item is clickedstring / React.ReactNode
typeType of the item'default' / 'select' / 'danger''default'
highlightText to be highlighted inside the itemstring
childrenChildren of the itemReact.ReactNode
indentLevelIndent level of the text inside the item.Number0

FAQs

Package last updated on 09 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc