Skip to content

Commit

Permalink
Fix propTypes declared twice in every declaration file
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Jul 25, 2023
1 parent 2a3a460 commit a0d2f6b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Clock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export type ClockProps = {
value?: string | Date | null;
};

export default function Clock({
const Clock: React.FC<ClockProps> = function Clock({
className,
formatHour,
hourHandLength = 50,
Expand All @@ -76,7 +76,7 @@ export default function Clock({
secondHandWidth = 1,
size = 150,
value,
}: ClockProps) {
}) {
function renderMinuteMarksFn() {
if (!renderMinuteMarks) {
return null;
Expand Down Expand Up @@ -202,7 +202,7 @@ export default function Clock({
{renderSecondHandFn()}
</time>
);
}
};

Clock.propTypes = {
className: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
Expand All @@ -229,3 +229,5 @@ Clock.propTypes = {
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
value: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]),
};

export default Clock;

0 comments on commit a0d2f6b

Please sign in to comment.