mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 00:51:20 +00:00
fix(client): render showcase as JSX component
Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
@@ -38,9 +38,11 @@ export default function ComponentDetailScreen() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ShowcaseComponent = showcase.component
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView style={tw`bg-stone-100 dark:bg-stone-900 flex-1`} contentContainerStyle={tw`px-5 pb-10 pt-4 gap-6`}>
|
<ScrollView style={tw`bg-stone-100 dark:bg-stone-900 flex-1`} contentContainerStyle={tw`px-5 pb-10 pt-4 gap-6`}>
|
||||||
{showcase.component()}
|
<ShowcaseComponent />
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { SansSerifText } from "./ui/sans-serif-text"
|
|||||||
|
|
||||||
export type Showcase = {
|
export type Showcase = {
|
||||||
title: string
|
title: string
|
||||||
component: () => React.ReactNode
|
component: React.ComponentType
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Section({ title, children }: { title: string; children: React.ReactNode }) {
|
export function Section({ title, children }: { title: string; children: React.ReactNode }) {
|
||||||
|
|||||||
Reference in New Issue
Block a user