govil-img-lazy
v0.0.14
Published
image component that load image when the image element is onScreen
Downloads
7
Readme
govil-link
A simply component written with TypeScript to present a link with arrow icon before it.
How to use
Clone this repo to your local computer, then run:
npm install && npm run build
You can now import govil-link
as a normal package installed from npm like so:
import Link from 'govil-link';
...
You can also import the type definitions if you're using TypeScript like so:
import Link, { LinkableTitle } from 'govil-link'
...
Available props
interface LinkableTitle {
title: string,
url: string,
isInternal: boolean
}
To customise this component, pass in a viewModel to the vm
prop.
// your-component.js
import Link from 'govil-link'
...
<Link title={vm.title} isInternal={true} url="https://www.gov.il/" />
...
This component was built for the benefit of the citizens of Israel on behalf of the government, but of course also for the benefit of the OpenSource community and freely published in npm