cd73088be6
Created by Github action Co-authored-by: github-actions <github-actions@twenty.com>
92 lines
1.6 KiB
Plaintext
92 lines
1.6 KiB
Plaintext
---
|
|
title: 图标
|
|
icon: 图标
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/objects/objects.png" alt="标题" />
|
|
</Frame>
|
|
|
|
我们应用程序中使用的图标列表。
|
|
|
|
## Tabler图标
|
|
|
|
我们在整个应用程序中使用了React的Tabler图标。
|
|
|
|
<Tabs>
|
|
|
|
<Tab title="安装">
|
|
<br />
|
|
|
|
```
|
|
yarn add @tabler/icons-react
|
|
```
|
|
|
|
</Tab>
|
|
|
|
<Tab title="属性">
|
|
|
|
您可以将每个图标导入为组件。 以下是一个示例:
|
|
<br />
|
|
|
|
```jsx
|
|
import { IconArrowLeft } from "@tabler/icons-react";
|
|
|
|
export const MyComponent = () => {
|
|
return <IconArrowLeft color="red" size={48} />;
|
|
};
|
|
```
|
|
|
|
</Tab>
|
|
|
|
<Tab title="属性">
|
|
|
|
|
|
| 属性 | 类型 | 描述 | 默认 |
|
|
| -- | ------ | ---------------- | ------------ |
|
|
| 大小 | 数字 | 图标的高度和宽度(以像素为单位) | 24 |
|
|
| 颜色 | string | 图标的颜色 | currentColor |
|
|
| 描边 | 数字 | 图标的描边宽度(以像素为单位) | 2 |
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
</Tabs>
|
|
|
|
## 自定义图标
|
|
|
|
除了Tabler图标外,该应用程序还使用了一些自定义图标。
|
|
|
|
### 图标通讯录
|
|
|
|
显示一个通讯录图标。
|
|
|
|
<Tabs>
|
|
|
|
<Tab title="用法">
|
|
|
|
```jsx
|
|
import { IconAddressBook } from 'twenty-ui/display';
|
|
|
|
export const MyComponent = () => {
|
|
return <IconAddressBook size={24} stroke={2} />;
|
|
};
|
|
```
|
|
|
|
</Tab>
|
|
|
|
<Tab title="属性">
|
|
|
|
|
|
| 属性 | 类型 | 描述 | 默认 |
|
|
| -- | -- | ---------------- | -- |
|
|
| 大小 | 数字 | 图标的高度和宽度(以像素为单位) | 24 |
|
|
| 描边 | 数字 | 图标的描边宽度(以像素为单位) | 2 |
|
|
|
|
|
|
|
|
</Tab>
|
|
|
|
</Tabs>
|