Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | 3x 3x 3x 3x 3x | import * as React from 'react'
import { observer } from 'mobx-react'
import { Store, TypeOptions } from './store'
import { getKernel } from '@code-202/kernel'
import CustomizeType, { Props as CustomizeTypeProps } from './customize-type'
export interface Props {
type?: Omit<CustomizeTypeProps, 'type' | 'store'>
}
export interface State {
}
class Customize extends React.Component<Props, State> {
protected store: Store
constructor(props: Props) {
super(props)
this.store = getKernel().container.get('cookie-consent') as Store
}
render (): React.ReactNode {
const types = this.store.types
return <>
{ types.map((type: TypeOptions) => (
<CustomizeType {...this.props.type} key={type.id} type={type} store={this.store} />
)) }
</>
}
}
export default observer(Customize)
|