Check out example codes for "styled components props typescript". It will help you in understanding the concepts better.

Code Example 1

# to prevent typescript error, install this
yarn add @types/styled-components

# NPM
npm install @types/styled-components

Learn ReactJs, React Native from akashmittal.com