0.2.0 • Published 1 month ago

expo-divkit v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

expo-divkit

Divkit render library for react-native expo

Installation in managed Expo projects

expo install expo-divkit

How to use

import { ScrollView } from "react-native"
import { ExpoDivKitView } from "expo-divkit"

const jsonPage = {
  "templates": {
    "title": {
      "type": "text",
      "font_size": 20,
      "line_height": 24,
      "font_weight": "bold",
      "paddings": {
        "left": 24,
        "right": 24,
        "bottom": 16
      }
    },
  },
  "card": {
    "log_id": "sample_card",
    "states": [{
      "state_id": 0,
      "div": {
        "type": "container",
        "orientation": "vertical",
        "margins": {
          "top": 24,
          "bottom": 24
        },
        "items": [{
          "type": "title",
          "text": "Hello world",
        }]
      }
    }]
  }
}

function App() {
    return <ScrollView>
       <ExpoDivKitView json={jsonPage} />
    </ScrollView>
}
0.2.0

1 month ago

0.1.7

9 months ago

0.1.6

10 months ago

0.1.5

10 months ago

0.1.4

10 months ago

0.1.1

11 months ago

0.1.0

11 months ago