Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/ButtonItem",
"definitions": {
"PostProcessDirectives": {
"type": "object",
"properties": {
"EventHandlerProps": {
"type": "object",
"properties": {
@mediawrangler
mediawrangler / list-types.ts
Created May 31, 2023 18:51
Suggested Type Definitions for SDK List Component
export interface ListProps {
list: List;
}
export type List = DefaultList | DescriptionList | OrderedList | DecoratedList;
export interface DefaultList {
listItems: ListItem[];
};
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/BlockView",
"definitions": {
"BlockView": {
"type": "object",
"properties": {
"blocks": {
"type": "array",
"items": {
@mediawrangler
mediawrangler / form-types-2.ts
Created May 22, 2023 19:42
Updated type definitions for FE SDK/Form component
export interface CheckboxField extends Choice {
checkboxField: {
/**
* Displays checkbox by default
* @default false
*/
useToggleSwitches: boolean;
}
}
// Flex Layout Example
{
"layoutConfig": {
"flexConfig": {
"align": "left",
"gapSettings": {
"rowGap": "5%",
"columnGap": "10%"
},
"scaleSettings": {
@mediawrangler
mediawrangler / SDK_Layout_Types.ts
Last active May 24, 2023 18:28
Suggested Type Definitions for SDK Layout Component
import { Block } from '../../types';
export interface LayoutProps {
layoutConfig: GridLayout | FlexLayout | ContainerLayout;
stylesOptions?: (MarginStyle | PaddingStyle | DimensionStyle | BorderStyle)[];
}
export interface GridLayout {
gridConfig?: {
template: 'dynamic' | 'fixed' | 'maxwidth' | 'static'; // do we need a 'maxwidth' template when there is a boolean?
@mediawrangler
mediawrangler / rania-chart.js
Created August 14, 2020 20:30
Chart temp workaround
/***
* @View
*
* @name chart
* @type block
* @description Chart Block - Visual representation of data in the form of a chart. The chart block has 7 different charts that contains static data. It can also contain dynamic data that is populated from the calculation block.
* @maturing
* @content
* @prop @required [chart_type] type={string} title="Type of Chart"
* "doughnut"
@mediawrangler
mediawrangler / lottie-control.hbs
Created August 12, 2020 15:57
Lottie Control Component
{{!--
###
# @View
#
# @name lottie-control
# @type component
# @description Lotties need a trigger; some event to cause them to start playing. So, we made the lottie-control component to enable a lottie to react to any event on the page by specifying the events you want the lottie to listen for. For example - you could listen for a button:clicked event, or a slider:change event or a form:validate event. The lottie-control component also enables us to specify which frames of the lottie to play using the fromFrame/toFrame construct. lottie-control also enables us to easily set up a slider to act as a 'scrubber' for a lottie; you control the lottie with the slider like a scrubber on a video player.
# @maturing
# @content
# @contains @object_of 'parameters' with:
@mediawrangler
mediawrangler / flipcard.hbs
Created August 12, 2020 15:56
Flipcard Component
{{!--
###
# @View
#
# @name flipcard
# @type component
# @description The Flipcard Component
# @maturing
# @content
# @contains @object_of 'parameters' with:
@mediawrangler
mediawrangler / drawer.hbs
Created August 12, 2020 15:55
Drawer Component
{{!--
###
# @View
#
# @name drawer
# @type component
# @description The Drawer component
# @maturing
# @content
# @contains @object_of 'parameters' with: