e02c24bd3a
Created by Github action --------- Co-authored-by: Abdul Rahman <ar5438376@gmail.com> Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: github-actions <github-actions@twenty.com> Co-authored-by: Charles Bochet <charles@twenty.com>
43 lines
2.1 KiB
Plaintext
43 lines
2.1 KiB
Plaintext
---
|
|
title: 画像入力
|
|
image: /images/user-guide/objects/objects.png
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/objects/objects.png" alt="Header" />
|
|
</Frame>
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
import { SandpackEditor} from '@site/src/ui/SandpackEditor'
|
|
import imageInputCode from '!!raw-loader!@site/src/ui/input/components/imageInputCode.js'
|
|
|
|
Allows users to upload and remove an image.
|
|
|
|
<Tabs>
|
|
<Tab title="Usage">
|
|
|
|
```jsx
|
|
import { ImageInput } from "@/ui/input/components/ImageInput";
|
|
|
|
export const MyComponent = () => {
|
|
return <ImageInput/>;
|
|
};
|
|
```
|
|
|
|
</Tab>
|
|
<Tab title="Props">
|
|
|
|
| プロパティ | タイプ | 説明 |
|
|
| ------------ | ------ | -------------------------------------------------------------------------------------- |
|
|
| 写真 | string | 画像ソースURL |
|
|
| onUpload | 機能 | 新しい画像がアップロードされたときに呼び出される関数。 新しい画像がアップロードされたときに呼び出される関数。 パラメーターとして `File` オブジェクトを受け取ります |
|
|
| onRemove | 機能 | ユーザーが削除ボタンをクリックしたときに呼び出される関数 |
|
|
| onAbort | 機能 | 画像のアップロード中に中止ボタンをクリックしたときに呼び出される関数 |
|
|
| isUploading | ブール型 | 画像が現在アップロード中であるかどうかを示します |
|
|
| errorMessage | string | 画像入力の下に表示されるオプションのエラーメッセージ |
|
|
| disabled | ブール型 | `true` の場合、入力全体が無効化され、ボタンをクリックできなくなります。 |
|
|
|
|
</Tab>
|
|
</Tabs>
|