Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Support addition of custom steps in UIConfig flows #161

Closed
BossBele opened this issue Mar 22, 2023 · 2 comments
Closed

Feature - Support addition of custom steps in UIConfig flows #161

BossBele opened this issue Mar 22, 2023 · 2 comments

Comments

@BossBele
Copy link
Contributor

Description

I would like to be able to add a custom and not a predefined flow step when initializing web SDK. This should make use of the components available such as image, input etc.

Alternatives

No alternative explored.

Does the feature have an issue or an open Canny ticket

N

If the feature request is approved, would you be willing to submit a PR

N

Examples and references

const ballerineInitConfig = {
  uiConfig: {
    general: {
      colors: {
        primary: '#1155cc',
      },
      fonts: {
        /*Change the font name to "Courier New", click Run, and see the how the font changes */
        name: 'Nunito',
        link: 'https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700;800&display=swap',
        weight: [400, 500, 700, 800],
      },
      translations: {
      },
    },
    flows: {
      'my-kyc-flow': {
        steps: [
          { 
            name: 'welcome',
            id: 'welcome',
          },
          { 
            name: 'customs',
            id: 'customs',
            // EXAMPLE STEP
            elements: [
                  {
          "type": "image",
          "props": {
              "style": {
                  "margin": "8px auto",
                  "flex-grow": 1
              },
              "attributes": {
                  "src": "https://cdn.ballerine.io/ui-packs/default/images/welcome.svg",
                  "alt": "welcome",
                  "width": "248px",
                  "height": "212px"
              }
          }
      },
    {
        "type": "input",
        "props": {}
    },
    {
        "type": "button",
        "props": {}
    },
            ]
          },
          {
            name: 'document-selection',
            id: 'document-selection',
            documentOptions: ['id_card', 'drivers_license', 'passport'],
          },
          {
            name: 'loading',
            id: 'loading',
          },
          {
            name: 'final',
            id: 'final',
          },
        ],
      },
  },
  translations: {
  },
  endUserInfo: { id: 'test-id' },
  backendConfig: {},
};
@alonp99
Copy link
Collaborator

alonp99 commented Apr 26, 2023

Hey @BossBele, to help us define the solution better - can you describe steps you would like to implement with the config?
cc @nitzanballerine

@alonp99
Copy link
Collaborator

alonp99 commented May 13, 2023

Added to the roadmap. closing

@alonp99 alonp99 closed this as completed May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants