Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Badge): refine the description of 'props' #12936

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

pany-ang
Copy link
Contributor

@pany-ang pany-ang commented Jun 15, 2024

根据以下 Badge.tsx 的源码,完善文档对应 content 的描述:

    const renderContent = () => {
      const { dot, max, content } = props;

      if (!dot && hasContent()) {
        if (slots.content) {
          return slots.content();
        }

        if (isDef(max) && isNumeric(content!) && +content > +max) {
          return `${max}+`;
        }

        return content;
      }
    };

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.89%. Comparing base (0e5e8e5) to head (198a7a4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12936      +/-   ##
==========================================
+ Coverage   88.87%   88.89%   +0.01%     
==========================================
  Files         257      257              
  Lines        6977     6977              
  Branches     1718     1718              
==========================================
+ Hits         6201     6202       +1     
  Misses        435      435              
+ Partials      341      340       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

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

Thanks 👍🏻

@chenjiahan chenjiahan merged commit 5c8e098 into youzan:main Jun 15, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants