-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Hi this is a great project @corygibbons !
What do you think about adding a prop like usingDefaultStyles that would use the defaults styles based on the extension?
So instead of:
const extension = getFileExtension(file);
const iconStyles = (defaultStyles as any)[extension] || {}; // Typescript does not like the type of defaultStyles as the key is not string
return <FileIcon extension={suffix} {...iconStyles} />
You could do (which would internally do the same as above):
const extension = getFileExtension(file);
return <FileIcon extension={suffix} usingDefaultStyles={true} />
I assume this is the most common use-case, or?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request