ionic-team / ionic-team/ionic-framework
feat: Expose matchBreakpoint
- Ngôn ngữ chính
- TypeScript
- Star
- 52.7k
- Fork
- 13.3k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 51
Mô tả
# Feature Request
**Ionic version:**
[x] **5.1.0**
**Describe the Feature Request**
I'm new to Ionic, and AFAIK, there's no _clean_ way to access ionic breakpoints in js. We can hardcode something like `window.matchMedia("(min-width: someSMValue)").matches` but we have to maintain this value and make sure that our "sm" is the same "sm" used in ionic.
**Describe Preferred Solution**
I would be usefull if this file was in the public api: https://github.com/ionic-team/ionic/blob/master/core/src/utils/media.ts
Hướng dẫn đóng góp
Hướng nghiên cứu
Start with core/src/utils/media.ts and inspect how matchBreakpoint is currently defined. Trace how Ionic utilities are exposed through the public API, then make the breakpoint helper available to JavaScript consumers without requiring duplicated breakpoint values. Done means consumers can access the helper through Ionic's public API.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- frontend
- Loại issue
- Tính năng
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100