mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-21 07:36:43 +00:00
a5fb3b910f
Implement new side panel that provides easy access to meeting information with copy/paste capabilities. Introduces xs text size to accommodate longer URLs. Panel includes space for future documentation links about meeting functionality. Addresses direct user requests for simpler sharing of meeting details.
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { useTranslation } from 'react-i18next'
|
|
import { RiInformationLine } from '@remixicon/react'
|
|
import { css } from '@/styled-system/css'
|
|
import { ToggleButton } from '@/primitives'
|
|
import { useSidePanel } from '../../hooks/useSidePanel'
|
|
import { ToggleButtonProps } from '@/primitives/ToggleButton'
|
|
|
|
export const InfoToggle = ({
|
|
onPress,
|
|
...props
|
|
}: Partial<ToggleButtonProps>) => {
|
|
const { t } = useTranslation('rooms', { keyPrefix: 'controls.info' })
|
|
|
|
const { isInfoOpen, toggleInfo } = useSidePanel()
|
|
const tooltipLabel = isInfoOpen ? 'open' : 'closed'
|
|
|
|
return (
|
|
<div
|
|
className={css({
|
|
position: 'relative',
|
|
display: 'inline-block',
|
|
})}
|
|
>
|
|
<ToggleButton
|
|
square
|
|
variant="primaryTextDark"
|
|
aria-label={t(tooltipLabel)}
|
|
tooltip={t(tooltipLabel)}
|
|
isSelected={isInfoOpen}
|
|
onPress={(e) => {
|
|
toggleInfo()
|
|
onPress?.(e)
|
|
}}
|
|
data-attr={`controls-info-${tooltipLabel}`}
|
|
{...props}
|
|
>
|
|
<RiInformationLine />
|
|
</ToggleButton>
|
|
</div>
|
|
)
|
|
}
|