Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

hugo-s29/ozmo-react

Repository files navigation

Ozmo compiler

Ozmo markup language compiler

Main repository

import Ozmo from 'ozmo-react'
import React from 'react'

const config = {
  components: {
    code: props => <Code language={props.args[0]}>{props.children}</Code>,
    h1: props => <h1>{props.args.join(' ')}</h1>,
    image: props => <img src={props.args[0]} />,
  },
  container: p => <div {...p}>{p.children}</div>,
}

const Component = ({ content }) => (
  <Ozmo content={content} config={config}></Ozmo>
)

export default Component