Modal add new support html code..

This commit is contained in:
Cüneyt Şentürk 2023-01-17 14:48:59 +03:00
parent 70a7cadf59
commit 48a254f52b
2 changed files with 5 additions and 5 deletions

View File

@ -14,9 +14,7 @@
<div class="p-5"> <div class="p-5">
<div class="flex items-center justify-between border-b pb-5"> <div class="flex items-center justify-between border-b pb-5">
<slot name="card-header"> <slot name="card-header">
<h4 class="text-base font-medium"> <h4 class="text-base font-medium" v-html="title"></h4>
{{ title }}
</h4>
<button type="button" class="text-lg" @click="onCancel" aria-hidden="true"> <button type="button" class="text-lg" @click="onCancel" aria-hidden="true">
<span class="rounded-md border-b-2 px-2 py-1 text-sm bg-gray-100">esc</span> <span class="rounded-md border-b-2 px-2 py-1 text-sm bg-gray-100">esc</span>

View File

@ -36,12 +36,13 @@
@case('delete') @case('delete')
@php @php
$text = $action['text'] ?? null;
$title = $action['title'] ?? null; $title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id'; $modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name'; $modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp @endphp
<x-delete-button :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" /> <x-delete-button :model="$action['model']" :route="$action['route']" :title="$title" :text="$text" :model-id="$modelId" :model-name="$modelName" />
@break @break
@default @default
@ -105,11 +106,12 @@
@php $divider = false; @endphp @php $divider = false; @endphp
@php @php
$text = $action['text'] ?? null;
$title = $action['title'] ?? null; $title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id'; $modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name'; $modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp @endphp
<x-delete-link :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" /> <x-delete-link :model="$action['model']" :route="$action['route']" :title="$title" :title="$text" :model-id="$modelId" :model-name="$modelName" />
@break @break
@case('divider') @case('divider')