mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-19 10:54:06 -06:00
prettier
This commit is contained in:
parent
7ad5c16495
commit
692815dd8d
@ -2,22 +2,17 @@ import { concatenateResources } from "../util/resources"
|
||||
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
||||
|
||||
interface GroupConfig {
|
||||
components: QuartzComponent[]
|
||||
components: QuartzComponent[]
|
||||
}
|
||||
|
||||
export default ((config: GroupConfig) => {
|
||||
const Group: QuartzComponent = (props: QuartzComponentProps) =>
|
||||
config.components
|
||||
.map((c: QuartzComponent) => ({ component: c }))
|
||||
.map((it: { component: QuartzComponent} ) => (<it.component {...props} />))
|
||||
const Group: QuartzComponent = (props: QuartzComponentProps) =>
|
||||
config.components
|
||||
.map((c: QuartzComponent) => ({ component: c }))
|
||||
.map((it: { component: QuartzComponent }) => <it.component {...props} />)
|
||||
|
||||
|
||||
Group.afterDOMLoaded = concatenateResources(
|
||||
...config.components.map((c) => c.afterDOMLoaded),
|
||||
)
|
||||
Group.beforeDOMLoaded = concatenateResources(
|
||||
...config.components.map((c) => c.beforeDOMLoaded),
|
||||
)
|
||||
Group.css = concatenateResources(...config.components.map((c) => c.css))
|
||||
return Group
|
||||
Group.afterDOMLoaded = concatenateResources(...config.components.map((c) => c.afterDOMLoaded))
|
||||
Group.beforeDOMLoaded = concatenateResources(...config.components.map((c) => c.beforeDOMLoaded))
|
||||
Group.css = concatenateResources(...config.components.map((c) => c.css))
|
||||
return Group
|
||||
}) satisfies QuartzComponentConstructor<GroupConfig>
|
||||
@ -51,5 +51,5 @@ export {
|
||||
Comments,
|
||||
Flex,
|
||||
ConditionalRender,
|
||||
Group
|
||||
Group,
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user