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

@asphalt-react/actionlist

Package Overview
Dependencies
Maintainers
4
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asphalt-react/actionlist

Actionlist

  • 2.0.0-alpha.2
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

Actionlist

A component to display a list of actions. It consists of 2 components

  • Actionlist
  • Action

Actionlist provides accessibility features to operate on Actions. It also represents bunch of provided Actions as a list.

An Action can function as any HTML or React element, it also supports qualifier to add icons before the caption for an action. A qualifier accepts SVG or SVG wrapped React component.

💡 Checkout @asphalt-react/iconpack for SVG wrapped React components.

Accessibility

  • Navigate among Actions using and arrow keys.
  • home and end focuses the first and last Actions respectively.
  • Action and Actionlist takes care of necessary aria-* attributes.
  • You can also add other aria-attributes like aria-labelledby, aria-label.

Usage

import Actionlist, { Action } from "@asphalt-react/actionlist"

function App () {

    return (
        <Actionlist>
            <Action as={Link} tagProps={{ to: "/document/edit" }}>
                Edit
            </Action>
            <Action actionable tagProps={{ onClick: (event) => {} }}>
                Clone
            </Action>
            <Action>Share</Action>
            <Action>Delete</Action>
        </Actionlist>
    )
}

export default App;

Props

children

List of actions to display inside Actionlist

typerequireddefault
nodetrueN/A

Action

An action item in an Actionlist. It renders an <a> tag by default.

Props

children

Add content for each Action

typerequireddefault
nodefalseN/A

qualifier

Renders an icon before the Action's content. Accepts SVG or SVG wrapped React component.

Checkout @asphalt-react/iconpack for SVG wrapped React components.

typerequireddefault
elementfalseN/A

danger

Applies danger styles to Action

typerequireddefault
boolfalsefalse

actionable

Action behaves like a button

typerequireddefault
boolfalsefalse

as

HTML element/React component to be rendered

typerequireddefault
elementTypefalseN/A

tagProps

Props for the Action element being rendered Attributes like onKeyPress, href can be passed

typerequireddefault
objectfalse{}

separator

Renders a separator before the Action, except for first one.

typerequireddefault
boolfalsefalse

Keywords

FAQs

Package last updated on 14 Apr 2022

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