-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(AssetPlayer): Refactor to new design of rebranding (LibraryDetail)
- Loading branch information
1 parent
c600232
commit 1c54630
Showing
20 changed files
with
160 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/leemons/src/common/AssetPlayer/components/ButtonIcon/ButtonIcon.constants.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import propTypes from 'prop-types'; | ||
|
||
export const BUTTONICON_DEFAULT_PROPS = { | ||
fileType: '', | ||
}; | ||
|
||
export const BUTTONICON_PROP_TYPES = { | ||
fileType: propTypes.string, | ||
}; |
42 changes: 42 additions & 0 deletions
42
packages/leemons/src/common/AssetPlayer/components/ButtonIcon/ButtonIcon.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from 'react'; | ||
import { Box } from '@bubbles-ui/components'; | ||
import { DownloadIcon, OpenIcon, SearchPlusIcon } from '@bubbles-ui/icons/outline'; | ||
import { ControlsPlayIcon } from '@bubbles-ui/icons/solid'; | ||
|
||
import { ButtonIconStyles } from './ButtonIcon.styles'; | ||
import { BUTTONICON_DEFAULT_PROPS, BUTTONICON_PROP_TYPES } from './ButtonIcon.constants'; | ||
|
||
const ButtonIcon = ({ fileType }) => { | ||
const { classes } = ButtonIconStyles({}); | ||
const fileTypeIcon = { | ||
image: ( | ||
<SearchPlusIcon | ||
color={'white'} | ||
width={24} | ||
height={24} | ||
style={{ marginTop: 8, marginLeft: 6 }} | ||
/> | ||
), | ||
file: <DownloadIcon color={'white'} />, | ||
document: <OpenIcon color={'white'} width={18} height={18} />, | ||
video: <ControlsPlayIcon color={'white'} />, | ||
}; | ||
|
||
return ( | ||
<Box | ||
className={classes.root} | ||
onClick={(e) => { | ||
e.preventDefault(); | ||
e.stopPropagation(); | ||
}} | ||
> | ||
<Box>{fileType && fileTypeIcon[fileType]}</Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
ButtonIcon.popTypes = BUTTONICON_PROP_TYPES; | ||
ButtonIcon.defaultProps = BUTTONICON_DEFAULT_PROPS; | ||
ButtonIcon.displayName = 'ButtonIcon'; | ||
|
||
export { ButtonIcon }; |
19 changes: 19 additions & 0 deletions
19
packages/leemons/src/common/AssetPlayer/components/ButtonIcon/ButtonIcon.styles.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { createStyles } from '@bubbles-ui/components'; | ||
|
||
const ButtonIconStyles = createStyles((theme) => ({ | ||
root: { | ||
display: 'flex', | ||
width: '40px', | ||
maxHeight: '40px', | ||
padding: '12px 16px 8px 16px', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
borderRadius: '4px', | ||
backgroundColor: theme.other.buttonIconCard.background.color.primary.default, | ||
'&:hover': { | ||
backgroundColor: theme.other.buttonIconCard.background.color.primary.hover, | ||
}, | ||
}, | ||
})); | ||
|
||
export { ButtonIconStyles }; |
1 change: 1 addition & 0 deletions
1
packages/leemons/src/common/AssetPlayer/components/ButtonIcon/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './ButtonIcon'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters