ant-design / ant-design/pro-components
👑 [需求] - Allow Overwriting the isMobile Constant Used in ProLayout and Retrieved from the useBreakpoint Hook
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🔩 所属模块或组件
ProLayout
### 🥰 需求描述
Allow the developer to customize the default behaviour of the isMobile in the ProLayout.
### ⛰ 功能需求适用场景
It would be beneficial for developers to be able to tailor the default behavior based on the value of the isMobile prop.
### 🧐 解决方案
Utilize the isMobile prop passed into the ProLayout component, instead of the internal isMobile constant set by useBreakpoint, only if the prop is explicitly set.
Contributor guide
Research direction
Start at the ProLayout component and trace how its isMobile value is obtained from the useBreakpoint hook. Check the existing isMobile prop handling and determine how to distinguish an explicitly provided value from the default. Done means an explicit prop overrides the hook value while the existing default behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100