
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@element-public/react-drawer
Advanced tools
Navigation drawers provide access to destinations and app functionality, such as switching accounts. It can either be permanently on-screen or controlled by a navigation menu icon. A navigation drawer is recommended for: 1. Apps with five or more top-level destinations 2. Apps with two or more levels of navigation hierarchy 3. Quick navigation between unrelated destinations
npm i @element-public/react-components @element-public/themes
npm i @element-public/react-drawer @element-public/themes
Open ~/.npmrc
in an editor and add the following line to enable the @element-public
scope:
@element-public:registry=https://npm.platforms.engineering
See below if you have never installed a package from Bayer's npm-enterprise or run into the following error:
npm ERR! code E401
npm ERR! Unable to authenticate, your authentication token seems to be invalid.
npm ERR! To correct this please trying logging in again with:
npm ERR! npm login
See the
devtools npm-e guide
to learn how to create an access token if this is the first time you are using a
npm-e package at Bayer or you do not have a line that starts with the following
in your ~/.npmrc
file:
//npm.platforms.engineering/:_authToken=
The Drawer component works with, or include, other components, like Button, to open, close, and navigate the Drawer, Typography, to apply certain styles and sizes of text in the Drawer, and List, to improve the flow of the Drawer's contents for users.
Different Drawers should be used in various cases. For example, a Permanent Drawer could be used to prevent a user from closing or navigating away from the Drawer, so it is always visible. Alternatively, a Dismissible Drawer can be opened and closed by clicking a button, so it only appears when the user wants it to.
Drawer uses the following sub components:
Name | Description |
---|---|
Drawer | Primary container for all the drawer contents |
DrawerHeader | Contains the top title portion of the drawer. |
DrawerContent | The container for the main body of the drawer. |
DrawerScrim | Covers the screen behind the drawer component to focus the users attention. |
DrawerAppContent | Container for app contents. Its child is resized when the drawer opens/closes. |
Name | Type | Default | Required | Description |
---|---|---|---|---|
belowTopAppBar | boolean | null | false | Positions the modal lower, below the TopAppBar. |
className | string | undefined | false | The css class name to be passed through to the component markup. |
open | boolean | null | false | Displays the drawer when variant is either dismissible or modal` |
variant | string | empty string | false | Defines the type of drawer. By default the drawer will be always shown, a permanent drawer. If defined, either modal or dismissible Accepted Values: modal, dismissible |
Name | Type | Default | Required | Deprecated | Description |
---|---|---|---|---|---|
dismissible | boolean | undefined | false | Use variant='dismissible' instead. | Enables a dismissible drawer. |
modal | boolean | undefined | false | Use variant='modal' instead. | Enabled a modal drawer. |
Name | Type | Default | Required | Description |
---|---|---|---|---|
children | React.ReactNode | null | false | Content to be rendered inside the Drawer |
Name | Default | Required | Params | Description |
---|---|---|---|---|
onClose | null | false | Fired when drawer is closed. | |
onOpen | null | false | Fired when drawer is opened. |
Description |
---|
Drawer: Child component DrawerToolbarSpacer has been removed. See DrawerAppContent . |
Name | Type | Default | Required | Description |
---|---|---|---|---|
belowTopAppBar | boolean | null | false | Positions the modal lower, below the TopAppBar. |
className | string | undefined | false | The css class name to be passed through to the component markup. |
Name | Type | Default | Required | Description |
---|---|---|---|---|
children | React.ReactNode | null | false | Content to be rendered inside the DrawerAppContent |
Name | Type | Default | Required | Description |
---|---|---|---|---|
className | string | undefined | false | The css class name to be passed through to the component markup. |
Name | Type | Default | Required | Description |
---|---|---|---|---|
children | React.ReactNode | null | false | Content to be rendered inside the drawer. Most commonly a list, but accepts any valid markup. |
Name | Type | Default | Required | Description |
---|---|---|---|---|
className | string | undefined | false | The css class name to be passed through to the component markup. |
subtitle | string | empty string | false | Subtitle of Drawer Header |
title | string | empty string | false | Title of Drawer Header |
Name | Type | Default | Required | Description |
---|---|---|---|---|
avatar | React.ReactNode | null | false | Most commonly an avatar style image, but accepts any valid markup. |
children | React.ReactNode | null | false | Most commonly a text or a Typography component, but accepts any valid markup. |
FAQs
Drawer component for Element React
We found that @element-public/react-drawer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.