Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ruucm committed Sep 9, 2024
1 parent 7e6fe1a commit 2254d12
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
17 changes: 10 additions & 7 deletions src/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
import * as React from "react";
import { ControlType } from "framer";
import { ControlType, PropertyControls } from "framer";

interface Props {
title: string;
}

const InnerButton: React.FC<Props> = (props) => {
type ButtonComponent = React.FC<Props> & {
propertyControls: typeof propertyControls;
};

export const Button: ButtonComponent = (props) => {
return (
<button className="bg-blue-700 p-3 text-green-200 font-bold text-xl rounded-sm">
<button className="bg-violet-700 p-6 text-green-200 font-bold text-2xl rounded-sm">
{props.title}
</button>
);
};

export const Button = InnerButton;

// @ts-ignore
Button.propertyControls = {
const propertyControls: PropertyControls<Props> = {
title: {
type: ControlType.String,
defaultValue: "Hello World",
},
};

Button.propertyControls = propertyControls;
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"include": ["."],
"include": ["./src/**/*"],
"exclude": ["dist", "build", "node_modules"],
"compilerOptions": {
"composite": false,
Expand Down

0 comments on commit 2254d12

Please sign in to comment.