-
-
Notifications
You must be signed in to change notification settings - Fork 50.8k
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
✨ feat: Breadcrumb Component Token #42342
Conversation
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature #42342 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 619 640 +21
Lines 11048 10844 -204
Branches 3081 2945 -136
==========================================
- Hits 11048 10844 -204
☔ View full report in Codecov by Sentry. |
<!-- prettier-ignore --> | ||
| Less 变量 | Component Token | 备注 | | ||
| --- | --- | --- | | ||
| `@drawer-bg` | `popoverBg` | - | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| `@drawer-bg` | `popoverBg` | - | |
无关的 less 变量不用放进来
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
components/breadcrumb/style/index.ts
Outdated
baseColor: token.colorTextDescription, | ||
lastItemColor: token.colorText, | ||
iconFontSize: token.fontSize, | ||
linkColor: token.colorTextDescription, | ||
linkColorHover: token.colorText, | ||
separatorColor: token.colorTextDescription, | ||
separatorMargin: token.marginXS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ComponentToken 要在 genComponentStyleHook
第三个参数初始化,不然会覆盖用户输入
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
components/breadcrumb/style/index.ts
Outdated
baseColor: string; | ||
iconFontSize: number; | ||
linkColor: string; | ||
linkColorHover: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linkColorHover: string; | |
linkHoverColor: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
components/breadcrumb/style/index.ts
Outdated
breadcrumbSeparatorMargin: number; | ||
breadcrumbSeparatorColor: string; | ||
export interface ComponentToken { | ||
baseColor: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
baseColor: string; | |
itemColor: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
8fea043
to
a966cd8
Compare
]} | ||
/> | ||
</ConfigProvider> | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最好能把所有 token 会改变的场景都列出来,现在 demo 里只能提现其中几个 token 的影响
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
6e22d10
to
40b5338
Compare
40b5338
to
36b5f1e
Compare
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
#41884
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at ef1cb5e
This pull request adds the
ComponentToken
interface to the breadcrumb component, which allows the users to customize the component style through the ConfigProvider theme prop. It also updates the documentation and the migration guide to show how to use theComponentToken
interface and how to map the Less variables to the ComponentToken values.🔍 Walkthrough
🤖 Generated by Copilot at ef1cb5e
genBreadcrumbStyle
and the default export functions in thecomponents/breadcrumb/style/index.ts
file with the ComponentToken properties, to simplify the styling of the breadcrumb component (link, link, link, link, link, link)