Let's use the following returns matrix, X
2Y 5Y 10Y
--------------------------
0.0143 0.0910 0.1451
0.1791 0.3505 0.4588
0.0572 0.1358 0.0120
0.0357 0.1809 0.2884
-0.0571 -0.1096 -0.0719
0.0286 0.0710 0.1319
0.0429 0.1806 0.2754
-0.0357 -0.0579 -0.1075
0.0714 0.2513 0.4304
-0.0214 -0.0771 -0.1667
The first PCA eigenvector is (0.2, 0.55, 0.8) corresponding to a shift, and the second eigenvector is (0.55, 0.62, -0.56) corresponding to a change in the slope.
The third eigenvector is (0.81, -0.55, 0.17) which by construction is orthogonal to the first two, and is therefore hedged against changes in both the level and slope of the curve - any portfolio with holdings proportional to this eigenvector will be hedged in the way you describe.
Obviously if you use more data, you will get a more reliable estimate of the PCA eigenvectors and a more effective hedge.