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
Merged

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 ant-design-bot commented Apr 10, 2020

@afc163 afc163 force-pushed the fix-page-header-style branch from f1331a8 to 32e5020 Compare Apr 10, 2020
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

@afc163 afc163 Apr 10, 2020

Choose a reason for hiding this comment

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

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

@codesandbox-ci
Copy link

@codesandbox-ci codesandbox-ci bot commented Apr 10, 2020

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
22 of 27 checks passed
@afc163 afc163 deleted the fix-page-header-style branch Apr 10, 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.

2 participants