MobileButton
Overview
MobileButton は、ボタンを表示します。
Specification
Property
使用できるプロパティの一覧です。プロパティを指定して値を更新することができます。
| Name | Type | Default | Description | Remark | 
|---|---|---|---|---|
| className | string | "" | コンポーネントの class 名 | |
| id | string | "" | コンポーネントの id 名 | |
| text | string | "" | ボタンに表示するテキスト | |
| type | string | "normal" | ボタンのデザインタイプ | 以下を指定できる "normal" : White(#ffffff) "submit" : Blue(#206694)  | 
| disabled | boolean | false | コンポーネントの編集可/不可設定 | |
| visible | boolean | true | コンポーネントの表示/非表示設定 | 
Event
指定できるイベントの一覧です。
| Name | Type | Description | Remark | 
|---|---|---|---|
| click | function | クリックされた時のイベントハンドラ | 引数には Event の event オブジェクトをとる | 
Constructor
MobileButton(options)
使用できるコンストラクタの一覧です。
Parameter
| Name | Type | Default | Description | Remark | 
|---|---|---|---|---|
| options | object | {} | コンポーネントのプロパティを含むオブジェクト | 
Sample Code
ヒント
導入と実装方法 をご確認ください。
全てのパラメータを指定した場合のサンプルコードです。
const Kuc = Kucs['1.x.x'];
const header = kintone.mobile.app.getHeaderMenuSpaceElement();
const mobileButton = new Kuc.MobileButton({
  text: 'Submit',
  type: 'submit',
  className: 'options-class',
  id: 'options-id',
  visible: true,
  disabled: false
});
header.appendChild(mobileButton);
mobileButton.addEventListener('click', event => {
  console.log(event);
});