feat(button-effect): adds ripple effect

This commit is contained in:
Manu Mtz.-Almeida
2018-01-16 23:40:20 +01:00
parent 802b540741
commit dcf1b8e478
7 changed files with 143 additions and 7 deletions

View File

@ -53,6 +53,11 @@ export function toDashCase(str: string) {
return str.replace(/([A-Z])/g, (g) => '-' + g[0].toLowerCase());
}
export function now(ev: UIEvent) {
return ev.timeStamp || Date.now();
}
export function pointerCoordX(ev: any): number {
// get X coordinates for either a mouse click
// or a touch depending on the given event