Key rules
chatty-block-answer-errorkhai báo 1 attribute, 0 property không có attribute, 1 event, 0 slot, 0 part và 0 CSS custom property.- Import 1 module
@avada/chatty-ui/elements/chatty-block-answer-error.jslà definechatty-block-answer-error; chunk chỉ import element nó dùng. Prototype chuẩn: trong guide. - Đổi tên attribute, event, slot, part hay CSS custom property là đổi API: diff của custom-elements.json phải có trong 1 MR.
On this page
Overview
Opt-in in-message answer error; retry remains owned by the host. Class ChattyBlockAnswerError.
Attributes
| Name | Property | Type | Default | Description |
|---|---|---|---|---|
block |
block |
object |
{ |
Canonical data. |
Properties
Attributes also expose the properties listed in the Property column above.
Not declared in the manifest.
Events
| Name | Detail type | Description |
|---|---|---|
chatty- |
CustomEvent<{ |
Answer retry requested. |
Slots
Not declared in the manifest.
Parts
Not declared in the manifest.
CSS custom properties
Not declared in the manifest.
Usage
import '@avada/chatty-ui/tokens/tokens.css';
import '@avada/chatty-ui/elements/chatty-block-answer-error.js';
<chatty-block-answer-error style="display:block"></chatty-block-answer-error>
Live preview
Component thật dùng cùng story với trang component; dữ liệu mẫu nằm trong frame cục bộ.
Default: trạng thái mặc định và nội dung mẫu của element.
Show code
<chatty-block-answer-error style="display:block"></chatty-block-answer-error>Các variant hoặc state chính đặt cạnh nhau trong cùng ví dụ.
Show code
import '@avada/chatty-ui/tokens/tokens.css';
import {html} from 'lit';
import '@avada/chatty-ui/elements/chatty-block-answer-error.js';
export function States() {
return html`<chatty-block-answer-error style="display:block" .block=${{data:{loading:true}}}></chatty-block-answer-error>`;
}Anatomy
Số trong hình khớp bảng bên dưới. Phần chỉ hiện ở state khác được ghi Not shown; ví dụ không thêm phần tử giả.
Anatomy: một instance mặc định riêng, có khoảng trống quanh các phần được đánh số.
Show code
<chatty-block-answer-error style="display:block"></chatty-block-answer-error>| Part | Element | Source |
|---|---|---|
| 1 | Element host chatty- |
chatty- |
Keyboard
No element-specific keys.
Source
- chatty-ui/custom-elements.json