Skip to content

feat(DateRanger): Support the style of customized panel#936

Open
linhf123 wants to merge 2 commits intomasterfrom
linhf/improve-daterange-style
Open

feat(DateRanger): Support the style of customized panel#936
linhf123 wants to merge 2 commits intomasterfrom
linhf/improve-daterange-style

Conversation

@linhf123
Copy link
Contributor

📦 Modified package

  • @oceanbase/design
  • @oceanbase/ui
  • @oceanbase/icons
  • @oceanbase/charts
  • @oceanbase/util
  • @oceanbase/codemod
  • Other (about what?)

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

Before After
image image

📝 Changelog

Language Changelog
🇺🇸 English Add styles prop, Support the style of customized panel
🇨🇳 Chinese 增加 styles 属性,支持定制展开的 panel 的右侧样式

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

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

@github-actions
Copy link

github-actions bot commented Jan 15, 2025

return (
<DateRanger
styles={{ pickerPanel: { width: '430px' } }}
tip={<div>通过定制右侧 Panel 的样式,让文字能在一行内展示完全</div>}
Copy link
Collaborator

Choose a reason for hiding this comment

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

通过扩大 Panel 宽度让内容展示在一行内,不太合理,还有其他的使用场景吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个是多云那边有这种使用场景

Copy link
Collaborator

Choose a reason for hiding this comment

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

内容超长换行是合理的,不应该通过加宽 Panel 绕过。如果没有其他应用场景,这个 feature 意义就不大了。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

那可以先不合,后面看有其他场景在合,当时想着是用户应该也有定制这个样式的场景并且内部样式不是自适应的,一起改了

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