@soltivo/theme-library v1.4.0
theme-library
This package was created to help with some custom hooks, components and functions helpers for the themes.
Overview
After installing this page you will be able to import into your project in a few ways.
import { findSection } from "@soltivo/theme-library";
// or
import * as themeLibrary from "@soltivo/theme-library";
// or
import EditableVideo from "@soltivo/theme-library/core/components/editables/editable.video/editable.video";Components
EditableVideo
This component is useful if you want to add a video to your theme, it uses react-player package, EditableVideo is useful to create video and background video editables for the website builder.
Helpers
Open
You can think of this method as a custom render react method usually used in a react entry point project. it uses rendermethod for development and hidrate for production SSR.
findSection
You can find section data using this method, by passing the WebsiteData and the name of the section, this is very useful inside pages and section components.
findPage
You can find pages using this method by passing WebsiteData and the name of the page you would like to find.
Constants
_CONFIG
config contains:
- bookingUrl- This constant helper to create a booking url to redirect to the right url in either production or development.