Created
October 29, 2019 18:05
-
-
Save darshilv/e0e6cf78cba6671df37fe960ef33e159 to your computer and use it in GitHub Desktop.
Sample input component for Framer X canvas
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" | |
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