Skip to content

Instantly share code, notes, and snippets.

@dontwork
Created May 8, 2020 21:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dontwork/b33daf890a73efac3862e63de9b4b21d to your computer and use it in GitHub Desktop.
Save dontwork/b33daf890a73efac3862e63de9b4b21d to your computer and use it in GitHub Desktop.
circular
import './decDefaults'
export * from 'dec'
export { LinkButton } from './LinkButton.js'
import m from 'mithril'
import { router } from '../router'
import { Button } from '../components'
export const LinkButton = () => {
return {
view ({ children, attrs }) {
return m(Button, {
variant: attrs.variant || 'link',
element: 'a',
...router.getHref(attrs.link.route, attrs.link.params),
...attrs
}, children)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment