Skip to content

Commit

Permalink
feat: 🎨 migrated component to tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
likhith-deriv committed Nov 16, 2022
1 parent d9f64ee commit 5d09bba
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 23 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import PopoverMessageCheckbox from './popover-message-checkbox';

export default PopoverMessageCheckbox;

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';
import Checkbox from '../checkbox';

type TPopoverMessageCheckbox = {
defaultChecked?: boolean;
message: string;
name?: string;
onChange: React.FormEventHandler<HTMLInputElement> &
((e: React.ChangeEvent<HTMLInputElement> | React.KeyboardEvent<HTMLSpanElement>) => void);
checkboxLabel: string;
};

const PopoverMessageCheckbox = ({
checkboxLabel,
defaultChecked,
onChange,
message,
name,
}: TPopoverMessageCheckbox) => (
<React.Fragment>
{message}
<Checkbox defaultChecked={defaultChecked} onChange={onChange} name={name} label={checkboxLabel} />
</React.Fragment>
);

export default PopoverMessageCheckbox;

0 comments on commit 5d09bba

Please sign in to comment.