Skip to content

Commit

Permalink
Update the Icon component (#712)
Browse files Browse the repository at this point in the history
* updated the Icon component by adding possibility to pass props

* updated the Icon component by adding possibility to pass props

* Automatic frontend build

---------

Co-authored-by: ValeriaMaltseva <[email protected]>
  • Loading branch information
ValeriaMaltseva and ValeriaMaltseva authored Nov 21, 2024
1 parent d23ca9b commit c70b05f
Show file tree
Hide file tree
Showing 20 changed files with 2,160 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/js/src/core/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface IconProps extends Omit<ElementIcon, 'type'> {
className?: string
}

export const Icon = ({ value, type = 'name', options, className }: IconProps): React.JSX.Element => {
export const Icon = ({ value, type = 'name', options, className, ...props }: IconProps): React.JSX.Element => {
const iconLibrary = useInjection<IconLibrary>(serviceIds.iconLibrary)
const width = options?.width ?? 16
const height = options?.height ?? 16
Expand Down Expand Up @@ -57,6 +57,7 @@ export const Icon = ({ value, type = 'name', options, className }: IconProps): R
<div
className={ `pimcore-icon pimcore-icon-${value} anticon ${className}` }
style={ { width, height } }
{ ...props }
>
{renderIcon()}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const PQLQueryInput = ({ value, handleChange, handleBlur, errorData, isSh
>
<Icon
className={ styles.infoIcon }
options={ { width: 12, height: 12 } }
value='question-circle-outlined'
/>
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"entrypoints": {
"vendor": {
"js": [
"/bundles/pimcorestudioui/build/0c41a9ab-2f8e-4ffa-96cd-c1b2c037471a/vendor.js"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"bundles/pimcorestudioui/build/0c41a9ab-2f8e-4ffa-96cd-c1b2c037471a/vendor.js": "/bundles/pimcorestudioui/build/0c41a9ab-2f8e-4ffa-96cd-c1b2c037471a/vendor.js"
}
2 changes: 2 additions & 0 deletions public/build/0c41a9ab-2f8e-4ffa-96cd-c1b2c037471a/vendor.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"entrypoints": {
"main": {
"js": [
"/bundles/pimcorestudioui/build/da1a26af-a33f-4ff7-8d88-e6078ebeafd8/main.js"
]
}
}
}
2 changes: 2 additions & 0 deletions public/build/da1a26af-a33f-4ff7-8d88-e6078ebeafd8/main.js

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,16 @@
/*!
*
* /**
* * Pimcore
* *
* * This source file is available under two different licenses:
* * - Pimcore Open Core License (POCL)
* * - Pimcore Commercial License (PCL)
* * Full copyright and license information is available in
* * LICENSE.md which is distributed with this source code.
* *
* * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* * @license https://github.com/pimcore/studio-ui-bundle/blob/1.x/LICENSE.md POCL and PCL
* * /
*
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"bundles/pimcorestudioui/build/da1a26af-a33f-4ff7-8d88-e6078ebeafd8/main.js": "/bundles/pimcorestudioui/build/da1a26af-a33f-4ff7-8d88-e6078ebeafd8/main.js"
}
2 changes: 2 additions & 0 deletions public/build/ea9a118a-b013-411b-ac1d-a25a81c67e95/105.js

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,16 @@
/*!
*
* /**
* * Pimcore
* *
* * This source file is available under two different licenses:
* * - Pimcore Open Core License (POCL)
* * - Pimcore Commercial License (PCL)
* * Full copyright and license information is available in
* * LICENSE.md which is distributed with this source code.
* *
* * @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* * @license https://github.com/pimcore/studio-ui-bundle/blob/1.x/LICENSE.md POCL and PCL
* * /
*
*/
16 changes: 16 additions & 0 deletions public/build/ea9a118a-b013-411b-ac1d-a25a81c67e95/core-dll.css

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

2 changes: 2 additions & 0 deletions public/build/ea9a118a-b013-411b-ac1d-a25a81c67e95/core-dll.js

Large diffs are not rendered by default.

Loading

0 comments on commit c70b05f

Please sign in to comment.