Skip to content

Commit

Permalink
[Svg]: don't set fill if it's not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekseyManetov committed Dec 10, 2024
1 parent 8729ce5 commit 2677acf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* [RTE]: fixed error while merging cells without content
* [RTE]: fixed bug when files added from attachment button inserted in preview mode instead of attachment block
* [RTE]: fixed crash when removing the sole table row
* [Svg]: don't set fill attribute if it's not provided
* [Modals]: autofocus first active element on modal open. It's a temporary fix, because of bug in react-focus-lock lib(https://github.com/theKashey/react-focus-lock/issues/340). Ideally focus should move to the first active element only after 'Tab' key was pressed, we will come back to this solution when bug will be fixed.

# 5.11.0 - 15.11.2024
Expand Down
4 changes: 2 additions & 2 deletions uui-components/src/widgets/Svg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {

interface ISvgProps {
className: string;
fill: string;
fill?: string;
height?: number | string;
width?: number | string;
}
Expand All @@ -27,10 +27,10 @@ export const Svg = React.forwardRef<SVGSVGElement, SvgProps>((props, ref) => {

const svgProps: ISvgProps = {
className: cx(props.cx),
fill: fillColor,
...props.rawProps,
};

if (fillColor !== undefined) svgProps.fill = fillColor;
if (height !== undefined) svgProps.height = height;
if (width !== undefined) svgProps.width = width;

Expand Down

0 comments on commit 2677acf

Please sign in to comment.