title: react-native with styled-components parent prop
body: <p>I'm working with styled-components on my react-native project and I wonder how can I get the parent prop from a child element .. here is an example, I've 2 styled-components</p>
  
  <pre><code>const First = styled.View`
    display: flex;
    width: 50px;
    height: 50px;
    background-color: ${props =&gt; props.selected ? 'blue' : 'red'};
  `
  const Second = styled.Text`
    // here I want to check if First has the selected prop.
    color: ${props =&gt; props.selected ? '#fff' : '#000'};
  `
  </code></pre>
  
  <p>and my own React component </p>
  
  <pre><code>const Test = () = (
    &lt;First selected&gt;
      &lt;Second&gt;Test&lt;/Second&gt;
    &lt;/First&gt;
  )
  </code></pre>
  
  <p>now how can I check if <code>Seconds</code> father (which is <code>First</code>) has the <code>selected</code> prop ?
  I know it will work if i'll give the selected attr to <code>Second</code> but it's not what I'm trying to achieve ... there must be a way because they nested, I tried to console log and props arg but I couldn't find the parent value in the object that the child returns.</p>
  
  <p>thanks</p>