All files / src/px-tree px-tree-icon.js

0% Statements 0/1
0% Branches 0/5
0% Functions 0/1
0% Lines 0/1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20                                       
import React from 'react';
export default ({className = 'chevron', open}) => (
  <span className={className}>
    <svg viewBox="0 0 16 16" preserveAspectRatio="xMidYMid meet" focusable="false"
      width={16}
      height={16}>
      <defs>
        <g id="open">
          <path d="M2.4 6.2l5.5 5.5 5.5-5.5" fill="black"></path>
        </g>
        <g id="closed">
          <path strokeLinejoin="round" d="M6.2 13.2l5.4-5.5-5.5-5.5" fill="black"></path>
        </g>
      </defs>
      {open && <use href='#open'/>}
      {!open && <use href='#closed'/>}
    </svg>
  </span>
);