cloudfour / cloudfour/cloudfour.com-patterns

Add an Error pattern to help with required component props

Đang mở
#1,690 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
:construction_worker: dev
Ngôn ngữ chính
SCSS
Star
26
Fork
3
Merge trung bình
19 giờ 32 phút
Pull request đã merge (30 ngày)
81

Mô tả

This is [an idea](https://github.com/cloudfour/cloudfour.com-patterns/pull/1689#issuecomment-1080986815) @calebeby came up with as a way to help make sure required component props are not accidentally missed when using a given component.

> Maybe you could do something with [defined](https://twig.symfony.com/doc/3.x/tests/defined.html)? Maybe render a message instead of the component if a given prop is not defined? 🤔

> Oh yeah that might be helpful. IDK if it's worth it, but we could probably make a error pattern that is very visible/flashy and then go through all our patterns and make them render the error pattern if any of their required props are missing

It may not be a higher priority, but would be helpful throughout the implementation of the components.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.