Sha256: 030327df35c2ea39c05e5c1be16889fa76511cc2a6d94a1ea2abc384ff5bc5d1
Contents?: true
Size: 1.5 KB
Versions: 1
Compression:
Stored size: 1.5 KB
Contents
<script lang="ts"> import { inertia, Link } from '@inertiajs/svelte' import <%= inertia_component_name %> from './<%= inertia_component_name %>.svelte' import type { <%= inertia_model_type %> } from './types' export let <%= singular_table_name %>: <%= inertia_model_type %> export let flash: { notice?: string } </script> <svelte:head> <title><%= human_name %> #{<%= singular_table_name %>.id}</title> </svelte:head> <div class="mx-auto md:w-2/3 w-full px-8 pt-8"> <div class="mx-auto"> {#if flash.notice} <p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-lg inline-block"> {flash.notice} </p> {/if} <h1 class="font-bold text-4xl"><%= human_name %> #{<%= singular_table_name %>.id}</h1> <<%= inertia_component_name %> {<%= singular_table_name %>} /> <Link href={`<%= js_edit_resource_path %>`} class="ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" > Edit this <%= human_name.downcase %> </Link> <Link href="<%= js_resources_path %>" class="ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" > Back to <%= human_name.pluralize.downcase %> </Link> <div class="inline-block ml-2"> <button use:inertia={{ href: `<%= js_resource_path %>`, method: 'delete' }} type="button" class="mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" > Destroy this <%= human_name.downcase %> </button> </div> </div> </div>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
inertia_rails-3.5.0 | lib/generators/inertia_tw_templates/scaffold/templates/svelte4/Show.ts.svelte.tt |