Skip to content

flixier/flixier-sdk-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flixier SDK

Installation & Usage

Via NPM or YARN

$ npm install @flixier/sdk -> if you're using NPM

or

$ yarn add @flixier/sdk -> if you're using YARN

Then just import it and get going :)

import FlixierSDK from '@flixier/sdk';

Via <script> tag

You can also add it directly in your HTML page via a script tag:

<script src="[path-to-script]/FlixierSDK.[version].js"></script> which will create a global object called FlixierSDK.

API

FlixierSDK.button

A function used to diynamically insert a Flixier button on your page. Clicking this button will open Flixier homepage.

Type: Function(rootElement, config?)

Params:

1. rootElement

The dynamically generated button will be inserted in this element;

Type: DOMElement

2. config

Aditional configuration options for the style and behaviour of the button.

Type: Object
Default:

{
    theme: 'blue', // styling theme. Available options: 'blue' | 'white'
    popup: true // whether or not to open it in a new window, as a pop-up
}

Returns

Returns a function you can use to remove the button from the page.

Example

import 'FlixierSDK.[version].js'

let removeFlixierBtn = window.FlixierSDK.button(document.body, {
    theme: 'white',
    popup: false
});

// Later in the progam when you no longer need it
removeFlixierBtn()

Made with ❤ by Flixier team

Releases

No releases published

Packages

No packages published