Interior Dimensions measure 19mm x 12mm for a snug fit, this is just a pressure fit but the tabs on my switches hold it in well along with the exterior rim on the switch.
I created this box to mount https://www.amazon.com/dp/B07S2QJKTX?psc=1&ref=ppx_yo2ov_dt_b_product_details to my Lack enclosure.
I recommend printing as they come in the stl file, on their side with supports touching buildplate enabled.
I printed these in PETG but PLA will work just fine.
The author marked this model as their own original creation.