vue-play icon indicating copy to clipboard operation
vue-play copied to clipboard

Provide source code as a link

Open sobolevn opened this issue 9 years ago • 1 comments

I would really love to give my users a link to the source code. github, jsfiddle or whatever. Right now only source code as text is possible.

What do you think?

sobolevn avatar Nov 14 '16 11:11 sobolevn

maybe we can accept a component:

import {EmbedURL} from 'vue-play'

play('foo', module)
  .add('scenario', {
    example: {
      render(h) {
        return <EmbedURL url={'http://jsbin.com/foo'} />
      }
    }
  })

and also if the value of example is a string we can check if it's a valid jsbin/jsfiddle/etc url. If so we wrap it in EmbedURL component implicitly.

egoist avatar Nov 14 '16 12:11 egoist