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

fix: PageHeader style breaks when title is too long #23133

Merged
merged 3 commits into from
Apr 10, 2020

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Apr 10, 2020

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

close #15664

💡 Background and solution

before ❌ after ✅
image image

📝 Changelog

Language Changelog
🇺🇸 English Fix PageHeader style breaks when title is too long and improve it's responsive design.
🇨🇳 Chinese 修复 PageHeader title 超长时布局被破坏的问题并优化响应式表现。

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

View rendered components/page-header/demo/responsive.md

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Apr 10, 2020

@afc163 afc163 force-pushed the fix-page-header-style branch from f1331a8 to 32e5020 Compare April 10, 2020 11:14
let ghost: undefined | boolean = true;
const PageHeader: React.FC<PageHeaderProps> = props => {
const [compact, updateCompact] = React.useState(false);
const onResize = ({ width }: { width: number }) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

这个参数没有类型,不得已声明了一下。

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 32e5020:

Sandbox Source
antd reproduction template Configuration

@afc163 afc163 merged commit bfd5d7c into master Apr 10, 2020
@afc163 afc163 deleted the fix-page-header-style branch April 10, 2020 11:25
@afc163 afc163 mentioned this pull request Apr 13, 2020
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.

PageHeader 文字过多超出换行了
2 participants