Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

715 B
Raw Blame
import { IconShare } from '@posthog/icons'

import { ButtonPrimitive, ButtonPrimitiveProps, DisabledReasonsObject } from 'lib/ui/Button/ButtonPrimitives'

import { SceneDataAttrKeyProps } from './utils'

type SceneShareButtonProps = SceneDataAttrKeyProps & {
    buttonProps?: Omit<ButtonPrimitiveProps, 'children' | 'data-attr'>
    disabledReasons?: DisabledReasonsObject
}

export function SceneShareButton({ buttonProps, dataAttrKey, disabledReasons }: SceneShareButtonProps): JSX.Element {
    return (
        <ButtonPrimitive {...buttonProps} data-attr={`${dataAttrKey}-share-button`} disabledReasons={disabledReasons}>
            <IconShare />
            Share or embed
        </ButtonPrimitive>
    )
}