ionic-team / ionic-team/ionic-framework

feat: Expose matchBreakpoint

Đang mở
#21,257 1 bình luận 6 reaction 0 người được giao Xem trên GitHub
package: core type: feature request
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

Mở 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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.