|
|
|
@ -18,7 +18,19 @@ const SlideItem = ({item}) => { |
|
|
|
|
console.log("ITEM",item); |
|
|
|
|
switch (item.type) { |
|
|
|
|
case "heading": |
|
|
|
|
return <h1><Children items={item.tokens} /></h1> |
|
|
|
|
switch(item.level) { |
|
|
|
|
case 1: |
|
|
|
|
return <h1><Children items={item.tokens} /></h1> |
|
|
|
|
case 2: |
|
|
|
|
return <h2><Children items={item.tokens} /></h2> |
|
|
|
|
case 3: |
|
|
|
|
return <h3><Children items={item.tokens} /></h3> |
|
|
|
|
case 4: |
|
|
|
|
return <h4><Children items={item.tokens} /></h4> |
|
|
|
|
case 5: |
|
|
|
|
default: |
|
|
|
|
return <h5><Children items={item.tokens} /></h5> |
|
|
|
|
} |
|
|
|
|
case "list": |
|
|
|
|
if (item.ordered) |
|
|
|
|
return <ol><Children items={item.items} /></ol> |
|
|
|
|