
<script type="text/jsx">
import { addUnit } from 'heiner-ui/src/utils/util';
import { inherit } from 'heiner-ui/src/utils/functional';

export default {
  name: 'HnIcon',
  componentName: 'HnIcon',
  functional: true,
  render(h, ctx) {
    const { props } = ctx;
    return <i
      class={['hn-icon-' + props.name]}
      style={{
        color: props.color,
        fontSize: addUnit(props.size)
      }}
      {...inherit(ctx, true)}
    />
  },

  props: {
    name: String,
    color: String,
    size: [Number, String]
  },
};
</script>
