Skip to content

Commit

Permalink
feat: add SCORM Icon to FileIcon and EmptyCardCover
Browse files Browse the repository at this point in the history
  • Loading branch information
paola-p committed Dec 21, 2023
1 parent 9eadf4d commit 7dd14d0
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/components/src/misc/CardEmptyCover/CardEmptyCover.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { AssetModuleIcon } from '../FileIcon/AssetModuleIcon';
import { AssetFeedbackIcon } from '../FileIcon/AssetFeedbackIcon';
import { FileItemDisplay } from '../../informative/FileItemDisplay';
import { AssetDocumentIconSmall } from '../FileIcon/AssetDocumentIcon';
import { AssetScormIcon } from '../FileIcon/AssetScormIcon';

const CardEmptyCover = memo(({ icon, fileType }) => {
const pairColumnRef = useRef(null);
Expand All @@ -38,6 +39,10 @@ const CardEmptyCover = memo(({ icon, fileType }) => {
key: 'learningpaths.module',
value: <AssetModuleIcon height={24} width={24} color={'#878D96'} />,
},
{
key: 'scorm',
value: <AssetScormIcon height={24} width={24} color={'#878D96'} />,
},
{
key: 'file',
value: <FileItemDisplay size={18} color={'#878D96'} />,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import PropTypes from 'prop-types';

export const ASSET_SCORM_ICON_DEFAULT_PROPS = {
width: 24,
height: 24,
color: '#7E8795',
};
export const ASSET_SCORM_ICON_PROP_TYPES = {
width: PropTypes.number,
height: PropTypes.number,
color: PropTypes.string,
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './AssetScormIcon';
2 changes: 2 additions & 0 deletions packages/components/src/misc/FileIcon/FileIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { AssetAudioIcon } from './AssetAudioIcon';
import { AssetImageIcon } from './AssetImageIcon';
import { AssetBookmarkIcon } from './AssetBookmarkIcon';
import { AssetDocumentIconSmall } from './AssetDocumentIcon';
import { AssetScormIcon } from './AssetScormIcon';

export const FILE_ICON_DEFAULT_PROPS = {
size: 16,
Expand Down Expand Up @@ -37,6 +38,7 @@ const FileIcon = ({ fileType, fileExtension, label, size, color, iconStyle, ...p
{ key: 'path', value: <AssetPathIcon height={size} width={size} /> },
{ key: 'curriculum', value: <PluginCurriculumIcon height={size} width={size} /> },
{ key: 'document', value: <AssetDocumentIconSmall height={18} width={18} /> },
{ key: 'scorm', value: <AssetScormIcon height={18} width={18} /> },
{
key: 'file',
value: (
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/misc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export * from './FileIcon/AssetBookmarkIcon';
export * from './FileIcon/AssetVideoIcon';
export * from './FileIcon/AssetMediaIcon';
export * from './FileIcon/AssetDocumentIcon';
export * from './FileIcon/AssetScormIcon';
export * from './AvatarSubject';
export * from './CardEmptyCover';

0 comments on commit 7dd14d0

Please sign in to comment.