Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@commercetools-uikit/primary-action-dropdown
Advanced tools
A PrimaryActionDropdown
is a dropdown with any number of action whereas the
first action of the dropdown can be triggered without opening the dropdown
itself.
The primary action, rendered as the head of the dropdown, is always the first
non-disabled <Option />
. If all <Option />
s are disabled, the head of the
dropdown will be disabled.
import PrimaryActionDropdown, {
PrimaryActionDropdownOption,
} from '@commercetools-uikit/primary-action-dropdown';
<PrimaryActionDropdown>
<PrimaryActionDropdownOption iconLeft={<PlusBoldIcon />} onClick={() => {}}>
Primary option
</PrimaryActionDropdownOption>
<PrimaryActionDropdownOption onClick={() => {}}>
Another option
</PrimaryActionDropdownOption>
<PrimaryActionDropdownOption isDisabled={true} onClick={() => {}}>
Even another option
</PrimaryActionDropdownOption>
</PrimaryActionDropdown>;
Props | Type | Required | Values | Default | Description |
---|---|---|---|---|---|
children | node | ✅ | - | - | The options of the dropdown (use the Option export from the component) |
Props | Type | Required | Values | Default | Description |
---|---|---|---|---|---|
onClick | func | ✅ | - | - | What will trigger whenever the option is clicked |
isDisabled | bool | - | - | false | Disables the option within the dropdown. If all options are disabled the dropdown will be disabled |
children | string | ✅ | - | - | The label of the option |
iconLeft | node | ✅ | - | - | The icon left to the option (only for the primary option) |
PrimaryActionDropdown
must have at least two Option
elements as
children
PrimaryButton
otherwiseMain Functions and use cases are:
FAQs
A dropdown component with any number of action, where the first action of the dropdown can be triggered without opening the dropdown itself.
The npm package @commercetools-uikit/primary-action-dropdown receives a total of 1,985 weekly downloads. As such, @commercetools-uikit/primary-action-dropdown popularity was classified as popular.
We found that @commercetools-uikit/primary-action-dropdown 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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.