This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import the Syncly SDK | |
const Syncly = require('syncly'); | |
// Initialize Syncly client with authentication (example) | |
const client = new Syncly.Client({ | |
apiKey: 'your-api-key-here' | |
}); | |
// Function to create a new calendar and event | |
async function createCalendarAndEvent(calendarName, eventTitle, eventStart, eventEnd) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import { Frame, addPropertyControls, ControlType } from "framer"; | |
export function Component({ childComponent }) { | |
return ( | |
<div style={{ width: "100%" }}> | |
{React.Children.map(childComponent, (child, index) => { | |
return React.cloneElement(child, { | |
width: "100%", | |
key: index, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
children: { | |
type: ControlType.Array, | |
propertyControl: { | |
type: ControlType.ComponentInstance, | |
}, | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Override, Data } from "framer" | |
import * as React from "react" | |
const slideData = Data({ currentSlide: 0 }) | |
export function SlideControls(props): Override { | |
// This sets the slidesNumber dynamically from the Page component | |
const slidesNumber = React.Children.toArray(props.children)[0].props | |
.children.length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ControlType, PropertyControls } from "framer"; | |
export function generatePropertyControls( | |
options: { | |
hidden?: (props: any) => boolean; | |
omittedProperties?: string[]; | |
} = {} | |
): PropertyControls { | |
const properties: PropertyControls = { | |
// Property Controls go here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Add() { | |
let css = document.createElement("link"); | |
css.href = "path/to/styles.css"; | |
css.id = "framerCustomCSS"; | |
document.head.appendChild(css); | |
} | |
if ( | |
document.getElementById("framerCustomCSS") | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Loader() { | |
if (document.getElementById("customScript")) { | |
console.log("Script is already loaded!"); | |
return; | |
} | |
const script = document.createElement("script"); | |
script.src = "path/to/sript.js"; | |
script.id = "customScript"; | |
document.head.appendChild(script); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import { Frame, addPropertyControls, ControlType } from "framer"; | |
/** | |
* This import will allow Overrides made in another file available to use in our component | |
* | |
* Change the override names and file name if yours is different | |
*/ | |
// import { Primary, Secondary, Destructive } from "./Examples"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react" | |
import { useState, useEffect } from "react" | |
// Hook | |
let cachedScripts = [] | |
export function useScript(src) { | |
// Keeping track of script loaded and error state | |
const [state, setState] = useState({ | |
loaded: false, |