react-icons/bs#BsPlay JavaScript Examples
The following examples show how to use
react-icons/bs#BsPlay.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DateFilter.jsx From covince with MIT License | 6 votes |
DateFilter = ({ className, dates = [], heading, label = 'Timeline', value, onChange, persistDate, playing, setPlaying, loading }) => (
<div className={className}>
<div className='h-6 flex justify-between items-start'>
<DescriptiveHeading>
{label}
</DescriptiveHeading>
<Button
className='fill-current flex items-center covince-timeline-button'
onClick={() => setPlaying(!playing)}
disabled={loading}
>
{ playing
? <>
<span>Pause</span>
<BsPause />
</>
: <>
<span>Play</span>
<BsPlay />
</> }
</Button>
</div>
<Heading className='mt-0.5 h-6'>
{loading ? <span>Loading data…</span> : heading}
</Heading>
<div className='h-6 mt-1.5'>
<Slider
min={0}
max={dates ? dates.length - 1 : 1}
onChange={onChange}
value={dates ? dates.indexOf(value) : 0.5}
disabled={!dates}
onMouseUp={persistDate}
onTouchEnd={persistDate}
onKeyUp={persistDate}
/>
</div>
</div>
)
Example #2
Source File: PlayButton.jsx From covince with MIT License | 6 votes |
function PlayButton ({ playing, toggleState, className }) {
return (
<CircleButton
className={classnames(className, 'h-5 w-5 box-content grid place-content-center')}
onClick={() => toggleState(!playing)}
title={playing ? 'Pause' : 'Play timeline'}
>
{ playing
? <BsPause className='w-5 h-5 text-gray-500' />
: <BsPlay className='w-6 h-6 text-gray-500 pl-0.5' /> }
</CircleButton>
)
}