Sha256: f7a5d0babf59ad9b6e239bad1257ccf39b6857eee1af523b37c0f0dff5312fc8

Contents?: true

Size: 498 Bytes

Versions: 2

Compression:

Stored size: 498 Bytes

Contents

'use strict';

const e = React.createElement;

class Profile extends React.Component {
  constructor(props) {
    super(props);
    this.state = { liked: false };
  }

  render() {
    return e(
      'img',
      {
        onClick: () => this.setState({liked: true}),
        src: '/assets/images/avatar.png',
        style: { width: '64px' }
      }
    );
  }
}
window.onload = () => {
  const domContainer = document.querySelector('#plugin-root');
  ReactDOM.render(e(Profile), domContainer);
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spring-jekyll-theme-0.0.6 assets/ecmascripts/index.js
spring-jekyll-theme-0.0.5 assets/ecmascripts/index.js