Skip to content

Conversation

@js2me
Copy link
Contributor

@js2me js2me commented Oct 13, 2025

  • refactored (removed renderContent function)

@js2me js2me requested a review from DakEnviy as a code owner October 13, 2025 13:01
@gravity-ui
Copy link
Contributor

gravity-ui bot commented Oct 13, 2025

Preview is ready.

@gravity-ui
Copy link
Contributor

gravity-ui bot commented Oct 13, 2025

Visual Tests Report is ready.

@amje
Copy link
Contributor

amje commented Oct 13, 2025

@js2me What's the purpose of this?

@js2me
Copy link
Contributor Author

js2me commented Oct 13, 2025

@amje customization.
In my project I want to add loading statement for this avatar component, otherwise I should create full copy of this component to add "children" prop.

@amje
Copy link
Contributor

amje commented Oct 13, 2025

@js2me Not sure if it's a proper API. Avatar has a strict appearance set by the design system and does not imply arbitrary content. Allowing any content can break component in many different ways.

@js2me
Copy link
Contributor Author

js2me commented Oct 13, 2025

@amje ok, but why className is allowed for this component if "has a strict appearance set by the design system and does not imply arbitrary content" ? Using this prop I can customize apperance of this component.
Also I do not understand why UIKit has a lot of components which accepts children as prop but this option is not allowed for this component

@amje
Copy link
Contributor

amje commented Oct 14, 2025

@amje ok, but why className is allowed for this component if "has a strict appearance set by the design system and does not imply arbitrary content" ? Using this prop I can customize apperance of this component. Also I do not understand why UIKit has a lot of components which accepts children as prop but this option is not allowed for this component

@js2me className main purpose is to mix with your classes in order to set margins or other outer layout styles. children is available only for components without own content, Avatar already has its content defined via other props

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants