Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
sunflower-antd
Advanced tools
Process Components for antd.
English | 简体中文
Usually, we use multiple components of antd to complete a process. For example, if you want to complete the function of "using Table to display the list after Form search", you need to deal with the relationship between "Form" and "Table", including query, pagination, etc.
Is there a way to simplify the maintenance of relationships between components? This is what sunflower is for. React-hooks that describe a scene are called "Process Components". Sunflower is a series of antd-based "Process Components".
The following is an example of a "Form & Table" scenario. You only need the following code to complete functions such as querying and paging. useFormTable
is a react-hooks, which will return the props of the antd component, etc. You can give these props to the antd component to complete the connection between the components.
import React from 'react';
import { useFormTable } from 'sunflower-antd';
import { Input, Button, Table, Form } from 'antd';
export default props => {
const { formProps, tableProps } = useFormTable({
async search(values) {
const res = await request(values);
return res;
},
});
return (
<div>
<Form {...formProps}>
<Form.Item label="Username" name="username">
<Input placeholder="Username" />
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit">
Search
</Button>
</Form.Item>
</Form>
<Table
columns={[
{
title: 'Username',
dataIndex: 'username',
key: 'username',
},
]}
{...tableProps}
/>
</div>
);
};
$ npm i sunflower-antd --save
// or
$ yarn add sunflower-antd
$ yarn
$ yarn start
FAQs
Process Components for antd
The npm package sunflower-antd receives a total of 11,626 weekly downloads. As such, sunflower-antd popularity was classified as popular.
We found that sunflower-antd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.