Sha256: 23eae419bc49c1266eb82cb81347ad3b5cc39b37d53e0b1f9ea0bd4b68710fd4
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 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> {#if flash.notice} <p class="notice">{flash.notice}</p> {/if} <h1><%= human_name %> #{<%= singular_table_name %>.id}</h1> <<%= inertia_component_name %> {<%= singular_table_name %>} /> <div> <Link href={`<%= js_edit_resource_path %>`}>Edit this <%= human_name.downcase %></Link> | <Link href="<%= js_resources_path %>">Back to <%= human_name.pluralize.downcase %></Link> <br /> <button use:inertia={{ href: `<%= js_resource_path %>`, method: 'delete' }} type="button" > Destroy this <%= human_name.downcase %> </button> </div> <style> .notice { color: green; } </style>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
inertia_rails-3.5.0 | lib/generators/inertia_templates/scaffold/templates/svelte4/Show.ts.svelte.tt |