Skip to content

Instantly share code, notes, and snippets.

@mamezito-zz
Created November 16, 2018 22:13
Show Gist options
  • Save mamezito-zz/22d353fbbc62f94e4872375f44c2e6c7 to your computer and use it in GitHub Desktop.
Save mamezito-zz/22d353fbbc62f94e4872375f44c2e6c7 to your computer and use it in GitHub Desktop.
import * as React from "react";
import { PropertyControls, ControlType } from "framer";
import { Button } from "@bulb/design";
interface Props {
text: string;
width: number;
height: number;
fullWidth: boolean;
}
export class button extends React.Component {
static defaultProps = {
text: "Click me",
fullWidth: false
};
static propertyControls: PropertyControls<Props> = {
text: { type: ControlType.String, title: "Title" },
fullWidth: { type: ControlType.Boolean, title: "Full Width" }
};
render() {
const { text, fullWidth } = this.props;
const { width, height } = this.props;
return (
<div
style={{
width,
height,
display: "flex",
alignItems: "center",
justifyContent: "center"
}}
>
<Button purpose="outline" fullWidth={fullWidth}>
{text || button.defaultProps.text}
</Button>
</div>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment