|
215 | 215 | {#if show}
|
216 | 216 | <div
|
217 | 217 | transition:dialog
|
218 |
| - on:introstart={() => (inTransition = true)} |
219 |
| - on:introend={() => { |
| 218 | + on:introstart="{() => (inTransition = true)}" |
| 219 | + on:introend="{() => { |
220 | 220 | inTransition = false
|
221 | 221 | /**
|
222 | 222 | * Emit when the open transition is done
|
223 | 223 | */
|
224 | 224 | dispatch('opened')
|
225 |
| - }} |
226 |
| - on:outrostart={onOutroStart} |
227 |
| - on:outroend={onOutroEnd} |
228 |
| - class={clsx( |
| 225 | + }}" |
| 226 | + on:outrostart="{onOutroStart}" |
| 227 | + on:outroend="{onOutroEnd}" |
| 228 | + class="{clsx( |
229 | 229 | 'c-dialog',
|
230 | 230 | rounded && roundedClass,
|
231 | 231 | inTransition && enterClassName,
|
232 | 232 | outTransition && leaveClassName,
|
233 |
| - customClass |
234 |
| - )} |
| 233 | + customClass, |
| 234 | + )}" |
235 | 235 | style:width
|
236 |
| - style={customStyle} |
| 236 | + style="{customStyle}" |
237 | 237 | >
|
238 | 238 | <div class="c-dialog--header">
|
239 | 239 | <!--
|
|
252 | 252 | class="c-dialog--close-btn"
|
253 | 253 | role="button"
|
254 | 254 | tabindex="0"
|
255 |
| - on:click={() => { |
| 255 | + on:click="{() => { |
256 | 256 | show = false
|
257 |
| - }} |
258 |
| - on:keypress={() => { |
| 257 | + }}" |
| 258 | + on:keypress="{() => { |
259 | 259 | show = false
|
260 |
| - }} |
| 260 | + }}" |
261 | 261 | >
|
262 | 262 | <!-- Customize the close icon -->
|
263 | 263 | <slot name="close-icon">
|
264 |
| - <div i-majesticons-close /> |
| 264 | + <div i-majesticons-close></div> |
265 | 265 | </slot>
|
266 | 266 | </div>
|
267 | 267 | {/if}
|
268 | 268 | </slot>
|
269 | 269 | </div>
|
270 | 270 | <div
|
271 |
| - class={clsx('c-dialog--content', bodyPadding && 'c-px-md c-pb-md')} |
272 |
| - style={customBodyStyle} |
273 |
| - style:height={bodyHeight} |
| 271 | + class="{clsx('c-dialog--content', bodyPadding && 'c-px-md c-pb-md')}" |
| 272 | + style="{customBodyStyle}" |
| 273 | + style:height="{bodyHeight}" |
274 | 274 | >
|
275 | 275 | <!-- The default content of dialog -->
|
276 | 276 | <slot />
|
|
287 | 287 | <div>
|
288 | 288 | {#if showCancelBtn}
|
289 | 289 | <CButton
|
290 |
| - label={cancelBtnLabel} |
| 290 | + label="{cancelBtnLabel}" |
291 | 291 | flat
|
292 | 292 | {rounded}
|
293 |
| - on:click={() => { |
| 293 | + on:click="{() => { |
294 | 294 | /**
|
295 | 295 | * Emit when the default cancel button clicked
|
296 | 296 | */
|
297 | 297 | dispatch('cancel')
|
298 |
| - }} |
| 298 | + }}" |
299 | 299 | />
|
300 | 300 | {/if}
|
301 | 301 | </div>
|
302 | 302 | <div>
|
303 | 303 | {#if showConfirmBtn}
|
304 | 304 | <CButton
|
305 |
| - label={confirmBtnLabel} |
| 305 | + label="{confirmBtnLabel}" |
306 | 306 | {rounded}
|
307 |
| - on:click={() => { |
| 307 | + on:click="{() => { |
308 | 308 | /**
|
309 | 309 | * Emit when the default confirm button clicked
|
310 | 310 | */
|
311 | 311 | dispatch('confirm')
|
312 |
| - }} |
| 312 | + }}" |
313 | 313 | />
|
314 | 314 | {/if}
|
315 | 315 | </div>
|
|
0 commit comments