Skip to content

Commit

Permalink
🐛 fix: fix file type icon (#243)
Browse files Browse the repository at this point in the history
* 🐛 fix: fix file type icon

* Update index.tsx

* Update index.tsx
  • Loading branch information
arvinxx authored Jan 10, 2025
1 parent 664dfef commit 03817d3
Show file tree
Hide file tree
Showing 18 changed files with 53 additions and 68 deletions.
1 change: 0 additions & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const nav: INavItem[] = [
{ link: '/components/brand/lobe-hub', title: 'Brand' },
{ link: '/components/mdx/callout', title: 'Mdx' },
{ link: '/components/color/color-scales', title: 'Color' },
{ link: '/components/icons/file-type-icon', mode: 'override', title: 'Icons' },
{ link: '/changelog', title: 'Changelog' },
];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Icon } from '@lobehub/ui';
import { FileTypeIcon } from '@lobehub/ui/icons';
import { FileTypeIcon, Icon } from '@lobehub/ui';
import { createStyles, useTheme } from 'antd-style';
import { ArrowUpIcon, PlusIcon } from 'lucide-react';
import { Center, Flexbox } from 'react-layout-kit';
Expand All @@ -13,12 +12,12 @@ const useStyles = createStyles(({ css, token }) => {
width: 150px;
height: 100px;
border-radius: ${token.borderRadiusLG}px;
font-weight: 500;
text-align: center;
background: ${token.colorFillTertiary};
border-radius: ${token.borderRadiusLG}px;
box-shadow: 0 0 0 1px ${token.colorFillTertiary} inset;
`,
glow: css`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FileTypeIcon, FileTypeIconProps } from '@lobehub/ui/icons';
import { FileTypeIcon, FileTypeIconProps } from '@lobehub/ui';

import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook';

export default () => {
Expand Down
16 changes: 16 additions & 0 deletions src/FileTypeIcon/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
nav: Components
title: FileTypeIcon
---

## Default

<code src="./demos/index.tsx" nopadding></code>

## Custom Icon

<code src="./demos/Icon.tsx" center></code>

## APIs

<API></API>
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { MaterialFileTypeIcon, MaterialFileTypeIconProps } from '@lobehub/ui/icons';
import { MaterialFileTypeIcon, MaterialFileTypeIconProps } from '@lobehub/ui';

import { StoryBook, useControls, useCreateStore } from '@lobehub/ui/storybook';

export default () => {
Expand Down
File renamed without changes.
12 changes: 12 additions & 0 deletions src/MaterialFileTypeIcon/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
nav: Components
title: MaterialFileTypeIcon
---

## Default

<code src="./demos/index.tsx" nopadding></code>

## APIs

<API></API>
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { memo, useMemo } from 'react';
import { Center } from 'react-layout-kit';

import { useCdnFn } from '@/ConfigProvider';
import FileTypeIcon from '@/FileTypeIcon';
import Img from '@/Img';
import FileTypeIcon from '@/icons/FileTypeIcon';
import { DivProps } from '@/types';

import { getIconUrlForDirectoryPath, getIconUrlForFilePath } from './utils';
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export {
export { default as EditableText, type EditableTextProps } from './EditableText';
export { default as EmojiPicker, type EmojiPickerProps } from './EmojiPicker';
export { default as EmptyCard, type EmptyCardProps } from './EmptyCard';
export { default as FileTypeIcon, type FileTypeIconProps } from './FileTypeIcon';
export { default as FluentEmoji, type FluentEmojiProps } from './FluentEmoji';
export { default as FontLoader, type FontLoaderProps } from './FontLoader';
export { default as Footer, type FooterProps } from './Footer';
Expand Down Expand Up @@ -80,6 +81,10 @@ export {
export { default as List, type ListItemProps } from './List';
export { default as Markdown, type MarkdownProps } from './Markdown';
export { Typography, type TypographyProps } from './Markdown/Typography';
export {
default as MaterialFileTypeIcon,
type MaterialFileTypeIconProps,
} from './MaterialFileTypeIcon';
export { default as Mermaid, type MermaidProps } from './Mermaid';
export { default as Modal, type ModalProps } from './Modal';
export { default as SearchBar, type SearchBarProps } from './SearchBar';
Expand Down
23 changes: 0 additions & 23 deletions src/icons/FileTypeIcon/index.md

This file was deleted.

17 changes: 0 additions & 17 deletions src/icons/MaterialFileTypeIcon/index.md

This file was deleted.

5 changes: 0 additions & 5 deletions src/icons/components.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/icons/icons.ts

This file was deleted.

15 changes: 13 additions & 2 deletions src/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
export * from './components';
export * from './icons';
export { default as Auth0, type CompoundedIcon as Auth0Props } from './Auth0';
export { default as Authelia, type CompoundedIcon as AutheliaProps } from './Authelia';
export { default as Authentik, type CompoundedIcon as AuthentikProps } from './Authentik';
export { default as Casdoor, type CompoundedIcon as CasdoorProps } from './Casdoor';
export { default as Clerk, type CompoundedIcon as ClerkProps } from './Clerk';
export { default as Logto, type CompoundedIcon as LogtoProps } from './Logto';
export {
default as MicrosoftEntra,
type CompoundedIcon as MicrosoftEntraProps,
} from './MicrosoftEntra';
export { default as NextAuth, type CompoundedIcon as NextAuthProps } from './NextAuth';
export { default as Zitadel, type CompoundedIcon as ZitadelProps } from './Zitadel';
export { Cloudflare, type CloudflareProps, Github, type GithubProps } from '@lobehub/icons';
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ export { default as Logo, type LobeHubProps as LogoProps } from './brand/LobeHub
export * from './chat';
export * from './color';
export * from './components';
export * from './icons/components';
export * from './mobile';
export * from './storybook';

0 comments on commit 03817d3

Please sign in to comment.