🍎iOS

SwiftUI version

1. Create your ComponentPropertyClass with properties that you need

public struct TextProperties: Decodable {
    public let text: String?
    public let textColorHex: String?
    public let textSize: String?
    public let backgroundHex: String?
    public let textAllCaps: Bool?
    public let textHtml: String?
}

2. Add your Component json object in Dymanic.json

[
  {
    "key": "MyCraftDText",
    "value": {
      "text": "Knife",
      "backgroundHex": "#9A71F6",
      "textSize": "30",
      "textColorHex": "#000000"
    }
  }
]
  

3. Create your Component

You can create any custom component that you need for example Text and add in the next step

4. Create your Component Builder

:memo: Note: This Builder must extend CraftBuilder Class and override craft method.

5. In your add your builder inside of CraftBuilderManager

So now enjoy your component!!!

Last updated