-
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(icons): add community and LikeHand icons
feat(editors): Add new "preset" to comments in TextEditorInput feat: HtmlText new property and icons feat(icons): new icons to communities and add new size to UserDisplayItem --------- Ticket: epic/Community-22 Refs: #185 Reviewed-by: @MIGUELez11 Co-authored-by: Fernando Marín Sánchez <[email protected]>
- Loading branch information
1 parent
35e8a76
commit 0c7e569
Showing
22 changed files
with
158 additions
and
86 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
28 changes: 28 additions & 0 deletions
28
packages/components/src/misc/FileIcon/AsssetCommunityIcon/AssetCommunityIcon.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
packages/components/src/misc/FileIcon/AsssetCommunityIcon/AsssetCommunityIcon.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,12 @@ | ||
import PropTypes from 'prop-types'; | ||
|
||
export const ASSET_COMMUNITY_ICON_DEFAULT_PROPS = { | ||
width: 24, | ||
height: 24, | ||
color: '#7E8795', | ||
}; | ||
export const ASSET_COMMUNITY_ICON_PROP_TYPES = { | ||
width: PropTypes.number, | ||
height: PropTypes.number, | ||
color: PropTypes.string, | ||
}; |
1 change: 1 addition & 0 deletions
1
packages/components/src/misc/FileIcon/AsssetCommunityIcon/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 './AssetCommunityIcon'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const truncateHtml = (element, maxLines) => { | ||
const allElements = element.getElementsByTagName('*'); | ||
let lineCount = 0; | ||
let lastElement; | ||
|
||
for (let i = 0; i < allElements.length; i++) { | ||
const currentElement = allElements[i]; | ||
const lines = Math.ceil( | ||
currentElement.offsetHeight / parseInt(getComputedStyle(currentElement).lineHeight), | ||
); | ||
|
||
if (lineCount + lines > maxLines) { | ||
const remainingLines = maxLines - lineCount; | ||
currentElement.style.overflow = 'hidden'; | ||
currentElement.style.textOverflow = 'ellipsis'; | ||
currentElement.style.display = '-webkit-box'; | ||
currentElement.style.WebkitLineClamp = remainingLines.toString(); | ||
currentElement.style.WebkitBoxOrient = 'vertical'; | ||
currentElement.style.wordBreak = 'keep-all'; | ||
currentElement.style.overflowWrap = 'break-word'; | ||
|
||
for (let j = i + 1; j < allElements.length; j++) { | ||
allElements[j].style.display = 'none'; | ||
} | ||
break; | ||
} | ||
|
||
lineCount += lines; | ||
lastElement = currentElement; | ||
} | ||
|
||
// Si no se excedió el límite, asegurarse de que el último elemento esté visible | ||
if (lastElement) { | ||
lastElement.style.display = ''; | ||
} | ||
}; | ||
|
||
export { truncateHtml }; |
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
Oops, something went wrong.