Code Blocks

August 15, 2021

Yes! Some code!

Here is the Dump component! Using prism-react-renderer:

const Dump = props => (
  <div
    style={{
      fontSize: 20,
      border: '1px solid #efefef',
      padding: 10,
      background: 'white',
    }}
  >
    {Object.entries(props).map(([key, val]) => (
      <pre key={key}>
        <strong style={{ color: 'white', background: 'red' }}>
          {key} 💩
        </strong>
        {JSON.stringify(val, '', ' ')}
      </pre>
    ))}
  </div>
)

render(<Dump props={['One', 'Two', 'Three', 'Four']} />)

Third Post!

Moon Pie