Skip to content

Commit

Permalink
Update with changes from next
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jul 27, 2020
1 parent 01f68da commit 8d468db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion framer/Material-UI.framerfx/code/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface Props {
label: string;
width: number | string;
height: number;
variant: 'contained' | 'outlined' | 'text';
variant?: 'contained' | 'outlined' | 'text';
}

export function Button(props: Props): JSX.Element {
Expand Down
3 changes: 2 additions & 1 deletion framer/Material-UI.framerfx/code/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interface Props {
label: string;
width: number | string;
height: number;
onChange?: React.ChangeEventHandler<HTMLInputElement>;
}

export function Checkbox(props: Props): JSX.Element {
Expand All @@ -21,7 +22,7 @@ export function Checkbox(props: Props): JSX.Element {
if (onChange) {
onChange(event);
}
setChecked((event.target as HTMLInputElement).checked);
setChecked(event.target.checked);
};

React.useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion framer/scripts/templates/button.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function «componentName»(props: Props): JSX.Element {

«componentName».defaultProps = {
«& defaultProps»
variant: 'text',
variant: 'text' as 'text',
};

addPropertyControls(«componentName», {
Expand Down
3 changes: 2 additions & 1 deletion framer/scripts/templates/selection_control.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import FormControlLabel, { FormControlLabelProps } from '@material-ui/core/FormC

interface Props {
«& tsInterface»
onChange?: React.ChangeEventHandler<HTMLInputElement>;
}

export function «componentName»(props: Props): JSX.Element {
Expand All @@ -16,7 +17,7 @@ export function «componentName»(props: Props): JSX.Element {
if (onChange) {
onChange(event);
}
setChecked((event.target as HTMLInputElement).checked);
setChecked(event.target.checked);
};

React.useEffect(() => {
Expand Down

0 comments on commit 8d468db

Please sign in to comment.