Skip to content

Conversation

@Raflos10
Copy link
Contributor

#56

@marc2332 marc2332 requested review from Copilot and marc2332 April 19, 2025 16:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enables omitting the icon size by changing the height and width properties in IconProps from plain integers with a default value to Optional integers that allow for omission.

  • Updated IconProps to accept Option for height and width with a default of Some(20)
  • Modified the Icon component to convert these optional values to strings
Comments suppressed due to low confidence (2)

packages/lib/src/icon_component.rs:50

  • Ensure tests cover scenarios when the height property is None to verify that the SVG element omits the height attribute as expected.
height: props.height.map(|height| height.to_string()),

packages/lib/src/icon_component.rs:51

  • Ensure tests cover scenarios when the width property is None to verify that the SVG element omits the width attribute as expected.
width: props.width.map(|width| width.to_string()),

Copy link
Member

@nissy-dev nissy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!Sorry for the late response.

@nissy-dev nissy-dev added the bug Something isn't working label May 12, 2025
@nissy-dev nissy-dev merged commit 5a42938 into dioxus-community:main May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants