mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
docs: og image for components (#3414)
This commit is contained in:
@@ -84,7 +84,7 @@ const props = defineProps<{
|
||||
const route = useRoute()
|
||||
const { $prettier } = useNuxtApp()
|
||||
|
||||
const camelName = camelCase(props.slug ?? route.params.slug?.[route.params.slug.length - 1] ?? '')
|
||||
const camelName = camelCase(props.slug ?? route.path.split('/').pop() ?? '')
|
||||
const name = `${props.prose ? 'Prose' : 'U'}${upperFirst(camelName)}`
|
||||
const component = defineAsyncComponent(() => {
|
||||
if (props.pro) {
|
||||
|
||||
@@ -7,7 +7,7 @@ const props = defineProps<{
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
const camelName = camelCase(route.params.slug?.[route.params.slug.length - 1] ?? '')
|
||||
const camelName = camelCase(route.path.split('/').pop() ?? '')
|
||||
const name = props.prose ? `Prose${upperFirst(camelName)}` : `U${upperFirst(camelName)}`
|
||||
|
||||
const meta = await fetchComponentMeta(name as any)
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -8,7 +8,7 @@ const props = defineProps<{
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
const camelName = camelCase(props.slug ?? route.params.slug?.[route.params.slug.length - 1] ?? '')
|
||||
const camelName = camelCase(props.slug ?? route.path.split('/').pop() ?? '')
|
||||
const name = `${props.prose ? 'Prose' : 'U'}${upperFirst(camelName)}`
|
||||
|
||||
const meta = await fetchComponentMeta(name as any)
|
||||
|
||||
@@ -15,7 +15,7 @@ const props = defineProps<{
|
||||
const route = useRoute()
|
||||
const { framework } = useSharedData()
|
||||
|
||||
const name = props.slug ?? route.params.slug?.[route.params.slug.length - 1] ?? ''
|
||||
const name = props.slug ?? route.path.split('/').pop() ?? ''
|
||||
const camelName = camelCase(name)
|
||||
|
||||
const strippedCompoundVariants = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user