Skip to content

Instantly share code, notes, and snippets.

@fform
Created April 29, 2019 18:44
Show Gist options
  • Save fform/8034bf6a466a424528967440a8579012 to your computer and use it in GitHub Desktop.
Save fform/8034bf6a466a424528967440a8579012 to your computer and use it in GitHub Desktop.
import * as React from "react"
import PSButton from "../../node_modules/@pluralsight/ps-design-system-button/dist/react"
import PSVars from "../../node_modules/@pluralsight/ps-design-system-button/dist/vars"
import { Frame, ControlType, PropertyControls } from "framer"
type Props = PSVars & {
url: string,
title: string
}
export class Button extends React.Component {
render() {
return (
<PSButton href={this.props.url} size={this.props.size} appearance={this.props.appearance}>
{this.props.title}
</PSButton>
)
}
static propertyControls: PropertyControls<Props> = {
title: { type: ControlType.String, title: "Title" },
url: { type: ControlType.String, title: "URL" },
appearance: {
type: ControlType.Enum,
options: ["primary", "secondary", "stroke", "flat"],
optionTitles: ["Primary", "Secondary", "Stroke", "Flat"],
},
size: {
type: ControlType.Enum,
options: ["medium","xSmall", "small", "large"],
optionTitles: ["Medium", "X-Small", "Small", "Large"],
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment