=============== LIBRARY RULES =============== From library maintainers: - Use Mix-UI components for mobile-first React applications - Import components from '@kfe/mix-ui' package - Follow TypeScript best practices when using components - Check component API documentation for proper prop usage ### Basic Icon Usage with Mix-UI Source: https://github.com/zvip-fe/mix-mkt-open-docs/blob/main/docs/mix-ui/Icons 图标.md Shows the basic implementation of various icons from '@kfe/mix-ui' in React, categorized by size (24px and 16px). It includes examples like 'ArrowClockwise', 'ArrowDown', 'Alipay', and 'CurrencyBubble'. ```typescript import React from 'react' import { ArrowClockwise24, ArrowClockwise16, ArrowDown24, ArrowDown16, ArrowSquarePathFill24, ArrowSquarePathFill16, Alipay24, CurrencyBubbleFill24, BadgeCgFill24 } from '@kfe/mix-ui' import { DemoBlock } from 'demos' export default () => { return (
) } ``` -------------------------------- ### Basic Image Usage with Mix-UI Source: https://github.com/zvip-fe/mix-mkt-open-docs/blob/main/docs/mix-ui/Image 图片.md Demonstrates the fundamental usage of the Mix-UI Image component, displaying a single image with a specified source. This serves as the starting point for integrating the component. ```tsx import React from 'react' import { Image } from '@kfe/mix-ui' import { DemoBlock } from 'demos' import './style.less' export default () => { return ( <>
) } ``` -------------------------------- ### CSS Styling for Dialog Component Source: https://github.com/zvip-fe/mix-mkt-open-docs/blob/main/docs/mix-ui/Dialog 弹出框.md Provides CSS examples for customizing the Dialog component's appearance, including global styles for the popup and specific styles for the confirm button. ```css .dialog { &:global(.mu-popup) { background-color: blue; } :global(.mu-dialog__confirm) { background-color: aqua; color: red; } } ``` -------------------------------- ### 运行 Mix-UI 文档处理器 (Bash) Source: https://github.com/zvip-fe/mix-mkt-open-docs/blob/main/README.md 用于启动 Mix-UI 文档处理流程的命令。支持基本用法、直接运行和调试模式。 ```Bash pnpm process-mixui ``` ```Bash node dist/index.js mixui ``` ```Bash node dist/index.js mixui --debug ``` -------------------------------- ### Tabs with Scrollspy and Sticky Navigation Source: https://github.com/zvip-fe/mix-mkt-open-docs/blob/main/docs/mix-ui/Tabs 标签页.md This example demonstrates how to use the Tabs component with the `scrollspy` and `sticky` properties enabled for a scrollable navigation experience. It includes basic setup and content for multiple tabs. ```tsx import React from 'react' import { Tabs } from '@kfe/mix-ui' import './style.less' export default () => { return (
{[1, 2, 3, 4, 5, 6, 7, 8].map(item => (
内容 {item}
))}
) } ``` -------------------------------- ### 开发模式 (Bash) Source: https://github.com/zvip-fe/mix-mkt-open-docs/blob/main/README.md 启动开发模式,通常会启用文件监听和自动重新构建。 ```Bash pnpm dev ``` -------------------------------- ### DOMPurify Sanitization Examples Source: https://github.com/zvip-fe/mix-mkt-open-docs/blob/main/docs/mix-ui/RichText 富文本展示.md Provides several examples demonstrating how DOMPurify sanitizes various types of potentially harmful HTML and JavaScript code, ensuring security. ```js DOMPurify.sanitize(''); // becomes DOMPurify.sanitize(''); // becomes DOMPurify.sanitize('

abc