docs: og image for components (#3414)

This commit is contained in:
Sébastien Chopin
2025-02-27 23:38:57 +01:00
committed by GitHub
parent dbc85b6149
commit 41397ca8bb
11 changed files with 120 additions and 192 deletions

View File

@@ -34,7 +34,7 @@ const props = withDefaults(defineProps<{
const route = useRoute()
const camelName = camelCase(props.name ?? route.params.slug?.[route.params.slug.length - 1] ?? '')
const camelName = camelCase(props.name ?? route.path.split('/').pop() ?? '')
const componentName = props.prose ? `Prose${upperFirst(camelName)}` : `U${upperFirst(camelName)}`
const componentTheme = ((props.pro ? props.prose ? themePro.prose : themePro : theme) as any)[camelName]