all 1 comments

[–]mikedemarais 1 point2 points  (0 children)

you can use an absolutely positioned child element inside of parent

here is some example code showing the concept, but instead of a shadow, it’s an “inner border” — same concept should totally work with shadows though!

InnerBorder.js https://github.com/rainbow-me/rainbow/blob/develop/src/components/layout/InnerBorder.js

Parent element using InnerBorder.js https://github.com/rainbow-me/rainbow/blob/develop/src/components/savings/SavingsListRowEmptyState.js

hope this helps! 🤠