Skip to content

Commit

Permalink
🐛 fix: Fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jun 25, 2024
1 parent 3ae30ff commit 6b289c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/FileTypeIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ import { memo, useMemo } from 'react';

import { DivProps, SvgProps } from '@/types';

export interface FileTypeIconProps extends SvgProps {
type IconProps = SvgProps & DivProps;

export interface FileTypeIconProps extends IconProps {
color?: string;
filetype?: string;
size?: number;
type?: 'file' | 'folder';
variant?: 'color' | 'mono';
}

const FileTypeIcon = memo<FileTypeIconProps & DivProps>(
const FileTypeIcon = memo<FileTypeIconProps>(
({ color, filetype, type = 'file', size = 48, style, variant, ...rest }) => {
const theme = useTheme();
const fontSize = useMemo(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/MaterialFileTypeIcon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import { DivProps } from '@/types';

import { getIconUrlForDirectoryPath, getIconUrlForFilePath } from './utils';

export interface MaterialFileTypeIconProps {
export interface MaterialFileTypeIconProps extends DivProps {
filename: string;
open?: boolean;
size?: number;
type?: 'file' | 'folder';
variant?: 'pure' | 'file' | 'folder';
}

const MaterialFileTypeIcon = memo<MaterialFileTypeIconProps & DivProps>(
const MaterialFileTypeIcon = memo<MaterialFileTypeIconProps>(
({ filename, size = 48, variant = 'pure', type, style, open, ...rest }) => {
const genCdnUrl = useCdnFn();
const ICONS_URL = genCdnUrl({
Expand Down

0 comments on commit 6b289c9

Please sign in to comment.