Skip to content

Commit

Permalink
RC #291 - Adding styling to event popover
Browse files Browse the repository at this point in the history
  • Loading branch information
dleadbetter committed Aug 13, 2024
1 parent 6bec342 commit 3ebb654
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/core-data/src/components/FacetTimeline.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

import { useTimer } from '@performant-software/shared-components';
import { Numbers, useTimer } from '@performant-software/shared-components';
import * as Popover from '@radix-ui/react-popover';
import * as Slider from '@radix-ui/react-slider';
import { clsx } from 'clsx';
Expand Down Expand Up @@ -248,8 +248,7 @@ const FacetTimeline = (props: Props) => {
return (
<div
className={clsx(
'py-7',
{ 'pt-16': !props.description },
{ 'pt-24': !props.description },
{ 'pt-40': props.description },
props.className
)}
Expand Down Expand Up @@ -291,7 +290,7 @@ const FacetTimeline = (props: Props) => {
right: 20,
bottom: 10
}}
sideOffset={-20}
sideOffset={Numbers.getRandomInt(-30, 10)}
side='top'
>
<button
Expand All @@ -316,10 +315,14 @@ const FacetTimeline = (props: Props) => {
onClick={() => props.onClick && props.onClick(event)}
type='button'
>
<h2>
<h2
className='font-bold text-lg whitespace-nowrap line-clamp-1 text-ellipsis'
>
{ event.name }
</h2>
<p>
<p
className='text-muted'
>
{ EventUtils.getDateView(event) }
</p>
{ props.description && (
Expand Down Expand Up @@ -356,6 +359,7 @@ const FacetTimeline = (props: Props) => {
min={min}
onValueChange={setValue}
onValueCommit={refine}
position='bottom'
value={value}
/>
</div>
Expand Down

0 comments on commit 3ebb654

Please sign in to comment.