Skip to content

Instantly share code, notes, and snippets.

@michaelevensen
Created September 27, 2018 07:17
Show Gist options
  • Save michaelevensen/3c7c1f75debb4f1d2bdfbd9adefd9cdb to your computer and use it in GitHub Desktop.
Save michaelevensen/3c7c1f75debb4f1d2bdfbd9adefd9cdb to your computer and use it in GitHub Desktop.
Conditionally show property controls based on props (or other values) in Framer X, returns `true` or `false`.
static propertyControls: PropertyControls = {
status: {
type: ControlType.Enum,
options: ["idle", "fetching", "success", "error"],
optionTitles: ["Idle", "Fetching", "Success", "Error"],
title: "Status"
},
errorText: {
type: ControlType.String,
title: "Error Text",
hidden: (props) => props.status !== "error"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment