5d438bb70c
## Summary - **New Getting Started section** with quickstart guide and restructured navigation - **Halftone-style illustrations** for User Guide and Developer introduction cards using a Canvas 2D filter script - **Removed hero images** (`image:` frontmatter + `<Frame><img>` blocks) from all user-guide article pages - **Cleaned up translations** (13 languages): removed hero images and updated introduction cards to use halftone style - **Cleaned up twenty-ui pages**: removed outdated hero images from component docs - **Deleted orphaned images**: `table.png`, `kanban.png` - **Developer page**: fixed duplicate icon, switched to 3-column layout ## Test plan - [ ] Verify docs site builds without errors - [ ] Check User Guide introduction page renders halftone card images in both light and dark mode - [ ] Check Developer introduction page renders 3-column layout with distinct icons - [ ] Confirm article pages no longer show hero images at the top - [ ] Spot-check a few translated pages to ensure hero images are removed 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: github-actions <github-actions@twenty.com>
153 lines
3.8 KiB
Plaintext
153 lines
3.8 KiB
Plaintext
---
|
|
title: 芯片
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/github/github-header.png" alt="标题" />
|
|
</Frame>
|
|
|
|
一个视觉元素,可用作可点击或不可点击的容器,带有标签、可选的左右组件和多种样式选项,用于显示标签和标记。
|
|
|
|
<Tabs>
|
|
|
|
<Tab title="**用法**">
|
|
|
|
```jsx
|
|
import { Chip } from 'twenty-ui/components';
|
|
|
|
export const MyComponent = () => {
|
|
return (
|
|
<Chip
|
|
size="large"
|
|
label="可点击的 Chip"
|
|
clickable={true}
|
|
variant="highlighted"
|
|
accent="text-primary"
|
|
leftComponent
|
|
rightComponent
|
|
maxWidth="200px"
|
|
className
|
|
/>
|
|
);
|
|
};
|
|
```
|
|
|
|
</Tab>
|
|
|
|
<Tab title="属性">
|
|
|
|
|
|
| 属性 | 类型 | 描述 |
|
|
| ------------ | --------------------- | ----------------------------- |
|
|
| linkToEntity | 字符串 | 指向实体的链接 |
|
|
| entityId | string | 实体的唯一标识符 |
|
|
| 名称 | 字符串 | 实体名称 |
|
|
| pictureUrl | string | 的图片", |
|
|
| avatarType | 头像类型 | 您要显示的头像类型。 有两个选项:`圆形`和`方形` |
|
|
| variant | `EntityChipVariant`枚举 | 您要显示的实体芯片的变体。 有两个选项:`普通`和`透明` |
|
|
| LeftIcon | IconComponent | 一个代表图标的React组件。 显示在芯片的左侧 |
|
|
|
|
|
|
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
## 示例
|
|
|
|
### 透明禁用芯片
|
|
|
|
```jsx
|
|
import { Chip } from 'twenty-ui/components';
|
|
|
|
export const MyComponent = () => {
|
|
return (
|
|
<Chip
|
|
size="large"
|
|
label="透明的禁用 Chip"
|
|
clickable={false}
|
|
variant="rounded"
|
|
accent="text-secondary"
|
|
leftComponent
|
|
rightComponent
|
|
maxWidth="200px"
|
|
className
|
|
/>
|
|
);
|
|
};
|
|
|
|
```
|
|
|
|
<br />
|
|
|
|
### 带工具提示的禁用芯片
|
|
|
|
```jsx
|
|
import { Chip } from "twenty-ui/components";
|
|
|
|
export const MyComponent = () => {
|
|
return (
|
|
<Chip
|
|
size="large"
|
|
label="当内容溢出时会触发工具提示的禁用 Chip。"
|
|
clickable={false}
|
|
variant="regular"
|
|
accent="text-primary"
|
|
leftComponent
|
|
rightComponent
|
|
maxWidth="200px"
|
|
className
|
|
/>
|
|
);
|
|
};
|
|
```
|
|
|
|
## 实体芯片
|
|
|
|
类似芯片的元素,用于显示有关实体的信息。
|
|
|
|
<Tabs>
|
|
|
|
<Tab title="用法">
|
|
|
|
```jsx
|
|
import { BrowserRouter as Router } from 'react-router-dom';
|
|
import { IconTwentyStar } from 'twenty-ui/display';
|
|
import { Chip } from 'twenty-ui/components';
|
|
|
|
export const MyComponent = () => {
|
|
return (
|
|
<Router>
|
|
<Chip
|
|
linkToEntity="/entity-link"
|
|
entityId="entityTest"
|
|
name="实体名称"
|
|
pictureUrl=""
|
|
avatarType="rounded"
|
|
variant="regular"
|
|
LeftIcon={IconTwentyStar}
|
|
/>
|
|
</Router>
|
|
);
|
|
};
|
|
```
|
|
|
|
</Tab>
|
|
|
|
<Tab title="属性">
|
|
|
|
|
|
| 属性 | 类型 | 描述 |
|
|
| ------------ | --------------------- | ----------------------------- |
|
|
| linkToEntity | string | 指向实体的链接 |
|
|
| entityId | string | 实体的唯一标识符 |
|
|
| 名称 | string | 实体名称 |
|
|
| pictureUrl | string | 的图片", |
|
|
| avatarType | 头像类型 | 您要显示的头像类型。 有两个选项:`圆形`和`方形` |
|
|
| variant | `EntityChipVariant`枚举 | 您要显示的实体芯片的变体。 有两个选项:`普通`和`透明` |
|
|
| LeftIcon | IconComponent | 一个代表图标的React组件。 显示在芯片的左侧 |
|
|
|
|
|
|
|
|
</Tab>
|
|
</Tabs>
|