36 lines
1.7 KiB
HTML
36 lines
1.7 KiB
HTML
<template>
|
|
<lightning-card title="File Upload Demo LWC" icon-name="custom:custom14">
|
|
<div class="slds-m-around_medium">
|
|
<lightning-input type="file"
|
|
accept=".png,.JPEG,.JPG"
|
|
label="Attachment" onchange={UploadFilechange}></lightning-input>
|
|
</div>
|
|
<template if:true={fileData}>
|
|
<p>{fileData.filename}</p>
|
|
</template>
|
|
|
|
<lightning-button variant="brand" label="submit" title="Submit" onclick={handleClick} class="slds-m-left_x-small"></lightning-button>
|
|
|
|
</lightning-card>
|
|
<lightning-card>
|
|
<!-- <c-common-notification></c-common-notification> -->
|
|
<lightning-button variant="brand" label="Custom toast" title="Custom Toast" onclick={notify}></lightning-button>
|
|
|
|
</lightning-card>
|
|
<template if:true={showToastBar}>
|
|
<div class="slds-notify_container">
|
|
<div class={outerClass} role="status">
|
|
<span class="slds-assistive-text">{header}</span>
|
|
<span class={innerClass} title={message}>
|
|
<lightning-icon icon-name={getIconName} alternative-text="icon" styleclass="slds-icon slds-icon_small" variant="inverse" size="small"></lightning-icon>
|
|
</span>
|
|
<div class="slds-notify__content">
|
|
<h2 class="slds-text-heading_small">{message}</h2>
|
|
</div>
|
|
<div class="slds-notify__close">
|
|
<lightning-button-icon icon-name="utility:close" size="small" variant="border-filled" class="slds-button slds-button_icon slds-button_icon-inverse" alternative-text="next" onclick={closeModel} ></lightning-button-icon>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template> |