Skip to content

Commit

Permalink
feat(CardEmptyCover): add new icon
Browse files Browse the repository at this point in the history
  • Loading branch information
fermarinsanchez committed Jan 5, 2024
1 parent 2158b57 commit 52eb4a1
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 49 deletions.
21 changes: 18 additions & 3 deletions merged_tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -6940,7 +6940,12 @@
},
"typo": {
"lg": {
"value": "{global.content.typo.body.lg--medium}",
"value": {
"fontFamily": "{core.font.family.main}",
"fontWeight": "{core.font.weight.medium}",
"lineHeight": "19 px",
"fontSize": "{core.font.size.100}"
},
"type": "typography"
},
"md": {
Expand Down Expand Up @@ -7257,7 +7262,12 @@
},
"typo": {
"lg": {
"value": "{global.content.typo.body.lg--medium}",
"value": {
"fontFamily": "{core.font.family.main}",
"fontWeight": "{core.font.weight.medium}",
"lineHeight": "19 px",
"fontSize": "{core.font.size.100}px"
},
"type": "typography"
},
"md": {
Expand Down Expand Up @@ -7454,7 +7464,12 @@
},
"typo": {
"lg": {
"value": "{global.content.typo.body.lg--medium}",
"value": {
"fontFamily": "{core.font.family.main}",
"fontWeight": "{core.font.weight.medium}",
"lineHeight": "19 px",
"fontSize": "{core.font.size.100}px"
},
"type": "typography"
},
"md": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export const AVATARS_GROUP_PROP_TYPES = {
color: PropTypes.string,
initials: PropTypes.string,
fullName: PropTypes.string,
})
}),
),
};
14 changes: 9 additions & 5 deletions packages/components/src/misc/CardEmptyCover/CardEmptyCover.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import { AssetTaskIcon } from '../FileIcon/AssetTaskIcon';
import { AssetExpressTaskIcon } from '../FileIcon/AssetExpressTaskIcon';
import { AssetModuleIcon } from '../FileIcon/AssetModuleIcon';
import { AssetFeedbackIcon } from '../FileIcon/AssetFeedbackIcon';
import { AssetAudioIcon } from '../FileIcon/AssetAudioIcon'
import { AssetVideoIcon } from '../FileIcon/AssetVideoIcon'
import { AssetImageIcon } from '../FileIcon/AssetImageIcon'
import { AssetBookmarkIcon } from '../FileIcon/AssetBookmarkIcon'
import { AssetAudioIcon } from '../FileIcon/AssetAudioIcon';
import { AssetVideoIcon } from '../FileIcon/AssetVideoIcon';
import { AssetImageIcon } from '../FileIcon/AssetImageIcon';
import { AssetBookmarkIcon } from '../FileIcon/AssetBookmarkIcon';
import { AssetDocumentIconSmall } from '../FileIcon/AssetDocumentIcon';
import { AssetScormIcon } from '../FileIcon/AssetScormIcon';
import { AssetTestIcon } from '../FileIcon/AssetTestIcon';
import { Box } from '../../layout/Box';

const CardEmptyCover = memo(({ icon, fileType }) => {
Expand All @@ -29,6 +30,7 @@ const CardEmptyCover = memo(({ icon, fileType }) => {
{ key: 'feedback', value: <AssetFeedbackIcon height={18} width={18} color={'#878D96'} /> },
{ key: 'document', value: <AssetDocumentIconSmall height={18} width={18} color={'#878D96'} /> },
{ key: 'task', value: <AssetTaskIcon height={18} width={18} color={'#878D96'} /> },
{ key: 'tests', value: <AssetTestIcon height={18} width={18} color={'#878D96'} /> },
{
key: 'taskexpress',
value: <AssetExpressTaskIcon height={18} width={18} color={'#878D96'} />,
Expand All @@ -43,7 +45,9 @@ const CardEmptyCover = memo(({ icon, fileType }) => {
},
{
key: 'file',
value: <FileItemDisplay size={24} color={'#878D96'} iconStyle={{ backgroundColor: '#f8f9fb' }} />,
value: (
<FileItemDisplay size={24} color={'#878D96'} iconStyle={{ backgroundColor: '#f8f9fb' }} />
),
},
];

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import PropTypes from 'prop-types';

export const ASSET_TEST_ICON_DEFAULT_PROPS = {
width: 24,
height: 24,
color: '#7E8795',
};
export const ASSET_TEST_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 './AssetTestIcon';
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 @@ -11,6 +11,7 @@ import { AssetImageIcon } from './AssetImageIcon';
import { AssetBookmarkIcon } from './AssetBookmarkIcon';
import { AssetDocumentIconSmall } from './AssetDocumentIcon';
import { AssetScormIcon } from './AssetScormIcon';
import { AssetTestIcon } from './AssetTestIcon';

export const FILE_ICON_DEFAULT_PROPS = {
size: 16,
Expand Down Expand Up @@ -39,6 +40,7 @@ const FileIcon = ({ fileType, fileExtension, label, size, color, iconStyle, ...p
{ 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: 'tests', value: <AssetTestIcon height={18} width={18} /> },
{
key: 'file',
value: (
Expand Down
53 changes: 13 additions & 40 deletions packages/components/src/tokens.compiled.js
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ export default {
"y": 0,
"blur": 4,
"spread": 0,
"color": "#ffffff",
"color": "#ffffff26",
"type": "dropShadow"
},
"type": "boxShadow"
Expand Down Expand Up @@ -1234,17 +1234,8 @@ export default {
"type": "color"
},
"hover--reverse-transparent": {
"value": "#ffffff",
"type": "color",
"$extensions": {
"studio.tokens": {
"modify": {
"type": "alpha",
"value": "0.15",
"space": "lch"
}
}
}
"value": "#ffffff26",
"type": "color"
},
"down": {
"value": "#F1FFBD",
Expand Down Expand Up @@ -4939,30 +4930,12 @@ export default {
"color": {
"primary": {
"default": {
"value": "#4D5358",
"type": "color",
"$extensions": {
"studio.tokens": {
"modify": {
"type": "alpha",
"value": "0.4",
"space": "lch"
}
}
}
"value": "#4d535866",
"type": "color"
},
"hover": {
"value": "#4D5358",
"type": "color",
"$extensions": {
"studio.tokens": {
"modify": {
"type": "alpha",
"value": "0.7",
"space": "lch"
}
}
}
"value": "#4d5358b3",
"type": "color"
},
"down": {
"value": "#4D5358",
Expand Down Expand Up @@ -5095,8 +5068,8 @@ export default {
"value": {
"fontFamily": "Albert Sans",
"fontWeight": 500,
"lineHeight": "24px",
"fontSize": "18px"
"lineHeight": "19 px",
"fontSize": 16
},
"type": "typography"
},
Expand Down Expand Up @@ -5451,8 +5424,8 @@ export default {
"value": {
"fontFamily": "Albert Sans",
"fontWeight": 500,
"lineHeight": "24px",
"fontSize": "18px"
"lineHeight": "19 px",
"fontSize": "16px"
},
"type": "typography"
},
Expand Down Expand Up @@ -5677,8 +5650,8 @@ export default {
"value": {
"fontFamily": "Albert Sans",
"fontWeight": 500,
"lineHeight": "24px",
"fontSize": "18px"
"lineHeight": "19 px",
"fontSize": "16px"
},
"type": "typography"
},
Expand Down

0 comments on commit 52eb4a1

Please sign in to comment.