Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions src/HeaderButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,19 @@ import type { ComponentProps, ReactNode } from 'react';
export type VisibleButtonProps = {
title: string;

IconComponent?: React.ComponentType<{
name: any; // TODO generify to support icon names
style?: any;
color?: ColorValue;
size?: number;
}>;
IconComponent?:
| React.ComponentType<{
name: any; // TODO generify to support icon names
style?: any;
size?: number;
color?: ColorValue;
}>
| React.ComponentType<{
name: any; // TODO generify to support icon names
style?: any;
size?: number;
color?: ColorValue | number;
}>;
iconName?: string;
iconSize?: number;
color?: ColorValue;
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/HeaderButtons.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('HeaderButtons', () => {
const IoniconsHeaderButton = (props: HeaderButtonProps) => (
<HeaderButton
{...props}
IconComponent={({ name }) => <Text>{name}</Text>}
IconComponent={({ name }: { name: any }) => <Text>{name}</Text>}
iconSize={23}
color="blue"
/>
Expand Down