: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
import { Meta } from '@storybook/react'
import { range } from 'lib/utils/arrays'
import { alphabet } from 'lib/utils/strings'
import { ProfileBubbles as ProfileBubblesComponent, ProfileBubblesProps } from './ProfileBubbles'
const DUMMIES: ProfileBubblesProps['people'] = [
{ email: '[email protected]', name: 'Michael' },
{ email: '[email protected]', name: 'Lottie' },
{ email: '[email protected]', name: 'Paul' },
{ email: '[email protected]', name: 'Joe' },
]
const meta: Meta<ProfileBubblesProps> = {
title: 'Lemon UI/Profile Bubbles',
component: ProfileBubblesComponent,
parameters: {
testOptions: {
waitForLoadersToDisappear: true,
},
},
args: {
people: DUMMIES,
},
tags: ['autodocs'],
}
export default meta
export function OneBubble(props: any): JSX.Element {
return <ProfileBubblesComponent {...props} people={DUMMIES.slice(0, 1)} />
}
export function MultipleBubblesWithTooltip(props: any): JSX.Element {
return (
<div className="flex flex-start">
<ProfileBubblesComponent {...props} tooltip="Cool people." />
</div>
)
}
export function MultipleBubblesWithNoImages(props: any): JSX.Element {
return (
<ProfileBubblesComponent
{...props}
people={range(20).map((x) => ({
name: alphabet[x],
email: '[email protected]',
}))}
/>
)
}
export function MultipleBubblesAtLimit(props: any): JSX.Element {
return <ProfileBubblesComponent {...props} limit={4} />
}
export function MultipleBubblesOverflowingByOne(props: any): JSX.Element {
return <ProfileBubblesComponent {...props} limit={3} />
}
export function MultipleBubblesOverflowingByTwo(props: any): JSX.Element {
return <ProfileBubblesComponent {...props} limit={2} />
}