A context menu for sharing a link and some text on various platforms.
You should have the chayns-components
package installed. If that is not the
case already, run
yarn add chayns-components
or
npm i chayns-components
After the chayns-components
package is installed, you can import the component
and use it with React:
import React from 'react'
import { SharingBar } from 'chayns-components';
// ...
<SharingBar {...} />
The SharingBar
-component takes the following props:
Name | Type | Default | Required |
---|---|---|---|
link | string |
||
linkText | string |
'' |
|
className | string |
||
stopPropagation | boolean |
false |
|
style | { [key: string]: string | number } |
||
children | ReactNode |
link?: string
The link that should be shared.
linkText?: string
A text that will be added in front of the shared link.
className?: string
A classname string that will be applied to the container element.
stopPropagation?: boolean
Wether click events should be prevented from propagating to parent elements.
style?: { [key: string]: string | number }
A React style object that will be applied to the container element.
children?: ReactNode
The children nodes of the SharingBar
.