Expose util functions to world
Hellycat opened this issue · 0 comments
Hellycat commented
Feature request
Expose functions from utils
Is your feature request related to a problem? Please describe.
I would like to use the functionality your library provides with own components. In this case it would be nice to get ability to import nexts methods: buildShareUrl
and handleCalendarButtonClick
from index.jsx
Describe the solution you'd like
I would like to get 2 functions exported:
export const handleCalendarClick(...), export const buildShareUrl(...) and
export const SHARE_SITES= {...`
In this case I can use it with my own components:
const href = buildShareUrl(
{
title,
description,
duration,
locationm
startDatetime,
endDatetime,
},
"Google"
)
return (
<button onClick={e => handleCalendarClick(e, href, "download")}>
<a href={href}>{"Google calendar"}</a>
</button>
)