title: Passing in parameter to Styled Components
body: <p>How can I pass in an argument into Styled Components?</p>
  
  <p>What I tried was to create an interface and a styled component:</p>
  
  <pre><code>export interface StyledContainerProps {
    topValue?: number;
  }
  
  export const StyledContainer: StyledComponentClass&lt;StyledContainerProps&gt; = styled.div`
    position: absolute;
    top: `${props.topValue || 0}px`;
  `;
  </code></pre>
  
  <p>Then I want to use it like this:</p>
  
  <pre><code>&lt;StyledContainer 
    topValue={123}
  &gt;
     This has a distance of 123px to the top
  &lt;/StyledContainer&gt;
  </code></pre>
  
  <p>But it's saying that <code>props</code> doesn't have the attribute <code>topValue</code>.</p>