odui-apply
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseApply an Open Design UI component
应用 Open Design UI 组件
Read the repository instructions, the component registry, and the component guide before editing. The registry is the source for each component alias, implementation, example and consumer.
- Inspect the target call site and record its behavior, accessible name, layout and visual states.
- Use the registry import alias, such as or
open-design-ui/button. Keep product state and handlers in the feature and preserve layout classes that remain necessary.open-design-ui/slider - Preserve native button , handler, disabled behavior and label. For Slider, preserve its accessible label, range, step and controlled value. Use
typefor temporary feedback andonPreviewfor persisted values when that matches the feature.onCommit - If the change removes a native JSX button or range input tracked by , lower only the matching count for that file and remove a zero-count entry.
scripts/studio-native-controls.json - Run and the affected Studio checks. Exercise the real consumer with keyboard input and both themes when the change affects interaction or appearance.
npm run design:check
Report the component and call site changed, the behavior exercised and any verification still pending.
编辑前,请阅读仓库中的说明、组件注册表和组件指南。每个组件的别名、实现、示例和使用方均以注册表为准。
- 检查目标调用点,并记录其行为、可访问名称、布局和视觉状态。
- 使用注册表中的导入别名,例如 或
open-design-ui/button。将产品状态和事件处理器保留在功能层,并保留仍然必要的布局类。open-design-ui/slider - 保留原生 button 的 、事件处理器、禁用行为和标签。对于 Slider,保留其可访问标签、范围、步长和受控值。当功能适用时,使用
type提供临时反馈,使用onPreview保存持久化值。onCommit - 如果此次修改移除了 中跟踪的原生 JSX button 或 range input,则仅降低对应文件的匹配计数,并删除计数为零的条目。
scripts/studio-native-controls.json - 运行 和受影响的 Studio 检查。当修改影响交互或外观时,使用键盘输入并测试两种主题下的真实使用方。
npm run design:check
报告已修改的组件和调用点、已测试的行为,以及仍待完成的验证事项。