Skip to content

Instantly share code, notes, and snippets.

@darshilv
Created October 29, 2019 18:05
Show Gist options
  • Save darshilv/e0e6cf78cba6671df37fe960ef33e159 to your computer and use it in GitHub Desktop.
Save darshilv/e0e6cf78cba6671df37fe960ef33e159 to your computer and use it in GitHub Desktop.
Sample input component for Framer X canvas
import * as React from "react"
import { Frame, addPropertyControls, ControlType } from "framer"
import { Input as SLDS_Input } from "@salesforce/design-system-react"
// Open Preview: Command + P
// Learn more: https://framer.com/api
export function Input(props) {
return <SLDS_Input {...props} />
}
Input.defaultProps = {
height: 32,
width: 240,
}
// Learn more: https://framer.com/api/property-controls/
addPropertyControls(Input, {
text: {
title: "Text",
type: ControlType.String,
defaultValue: "",
},
placeholder: {
title: "Placeholder",
type: ControlType.String,
defaultValue: "What to write",
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment