Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
antd_mobile_custom_ui_exa
Advanced tools
antd_mobile_custom_ui_exa 是 Ant Design Mobile 针对聚宝风格的 React 实现。 我们在 antd-mobile 的基础上,参照「聚宝 UI 设计规范」进行了风格定制。
# need `node@6+` `npm@3+`
$ npm i
$ ./node_modules/.bin/gulp # 自动同步 antd-mobile 组件和 demo ,并监控文件变化(注意过程中的提示)
访问
& npm run pub # 构建并发布到 npm
& gulp site # 构建网站文件,手工放到 GitHub gh-pages 分支即可
antd_mobile_custom_ui_exa
为你的包名,例如 xxx-ui
,并修改相应文档的文案。开发
文档,跑起来。themes/default.less
文件里覆盖 antd-mobile 提供的相应 less 变量 (可以在此目录添加更多的 theme 文件)。components/xx/index.tsx
文件里添加自己的代码逻辑。组件的目录结构如下:
components/steps
├── demo
│ ├── basic.md // 演示文档,可以有多个
│ └── another.md
├── index.md // 组件的入口文档
├── index.tsx // 组件 JS 入口,通常依赖 antd-mobile 上的对应组件并直接暴露
└── style
├── index.less // 组件样式,通常依赖 antd-mobile 上的对应样式并进行复写
└── index.tsx // 组件样式的入口
通常需要进行复写的源码有以下两个:
index.tsx
使用 typescript 规范进行书写:
// 依赖后直接暴露
import Button from 'antd-mobile/lib/steps/index';
export default Button;
import React from 'react';
import Icon from 'antd-mobile/lib/icon/index';
export interface Props {
prefixCls?: string;
}
export default class MyIcon extends React.Component<Props, any> {
static defaultProps = {
prefixCls: 'am-icon',
};
render() {
return (
<span className="extend-icon"><Icon {...this.props} /></span>
)
}
}
style/index.less
@import '~antd-mobile/lib/icon/style/index.less';
.extend-icon {
padding: 10px; // extend touch area
}
FAQs
Ant Design 移动版的聚宝风格定制版
The npm package antd_mobile_custom_ui_exa receives a total of 0 weekly downloads. As such, antd_mobile_custom_ui_exa popularity was classified as not popular.
We found that antd_mobile_custom_ui_exa demonstrated a not healthy version release cadence and project activity because the last version was released 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 a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.