CHANGE: remove withDefaults

Remove with defaults as it is no longer needed
This commit is contained in:
webfussel 2025-01-29 09:21:57 +01:00
parent 41a582fea4
commit c82262e02d
2 changed files with 8 additions and 7 deletions

View file

@ -12,9 +12,9 @@ type Props = {
label : string label : string
} }
const props = withDefaults(defineProps<Props>(), { const {
type : 'a' type = 'a'
}) } = defineProps<Props>()
const actualProps = () => { const actualProps = () => {
if (props.type === 'a') { if (props.type === 'a') {

View file

@ -17,10 +17,11 @@ type Props = {
size?: 's' | 'm' | 'l' size?: 's' | 'm' | 'l'
} }
const {name, size, width} = withDefaults(defineProps<Props>(), { const {
size: 'm', name,
width: 50, size = 'm',
}) width = 50,
} = defineProps<Props>()
const sizes = { const sizes = {
s: 15, s: 15,