Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@leafygreen-ui/icon-button
Advanced tools
yarn add @leafygreen-ui/icon-button
npm install @leafygreen-ui/icon-button
import EllipsisIcon from '@leafygreen-ui/icon/dist/Ellipsis';
import IconButton from '@leafygreen-ui/icon-button';
<IconButton darkMode={true} aria-label="Some Menu">
<EllipsisIcon />
</IconButton>;
Output HTML
<button aria-disabled="false" class="leafygreen-ui-194rp0y" aria-label="Some Menu>
<div class="leafygreen-ui-1rvdyoi">
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
<g
id="Ellipsis-Copy"
stroke="none"
stroke-width="1"
fill="none"
fill-rule="evenodd"
>
<path fill="#89989B"></path>
</g>
</svg>
</div>
</button>
Prop | Type | Description | Default |
---|---|---|---|
darkMode | boolean | Determines whether or not the IconButton will appear in darkMode. | false |
onClick | function | The event handler function for the 'onclick' event. Receives the associated event object as the first argument. | |
disabled | boolean | Disables the <IconButton /> | false |
href | string | If a href is supplied, the component renders inside of an a tag instead of inside of a button tag. | |
className | string | Adds a className to the class attribute on the container element. | |
children | node | Content rendered inside of the <IconButton /> component | |
size | 'default' , 'large' , 'xlarge' | Determines the size of the IconButton | 'default' |
active | boolean | Determines whether the <IconButton /> will appear active | false |
aria-label or aria-labelledby | string | One of these must be provided. See note below | |
... | native anchor or button attributes | Any other properties will be spread on the rendered HTML element or component. |
Either aria-label
or aria-labelledby
must be provided a string, or there will be a console error. This is to ensure that screenreaders have a description for what the button does, since the button itself doesn't contain any text.
Any other properties will be spread on the container element.
FAQs
LeafyGreen UI Kit Icon Buttons
We found that @leafygreen-ui/icon-button demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.