Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/livecodes/templates/starter/vue-sfc-starter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ import Counter from './Component.vue';
<script setup lang="tsx">
import { ref } from 'vue';

const props = defineProps({
name: String
})
interface Props {
name?: string
}
const props = defineProps<Props>();
const count = ref(0);
const align = 'center';

// define inline component
function Greeting(props: {name?: string}) {
function Greeting(props: Props) {
return <h1>Hello, { props.name || 'World' }!</h1>
}
</script>
Expand Down