creates video voice memos from audio clips; with bluesky integration.
trill.ptr.pet
1import { Show, children, splitProps } from 'solid-js'
2import * as StyledProgress from './styled/progress'
3
4export interface ProgressProps extends StyledProgress.RootProps {
5 /**
6 * The type of progress to render.
7 * @default linear
8 */
9 type?: 'linear' | 'circular'
10}
11
12export const Progress = (props: ProgressProps) => {
13 const [localProps, rootProps] = splitProps(props, ['children', 'type'])
14 const getChildren = children(() => localProps.children)
15
16 return (
17 <StyledProgress.Root {...rootProps}>
18 <Show when={getChildren()}>
19 <StyledProgress.Label>{getChildren()}</StyledProgress.Label>
20 </Show>
21 <Show
22 when={localProps.type === 'circular'}
23 fallback={
24 <StyledProgress.Track>
25 <StyledProgress.Range />
26 </StyledProgress.Track>
27 }
28 >
29 <StyledProgress.Circle>
30 <StyledProgress.CircleTrack />
31 <StyledProgress.CircleRange />
32 <StyledProgress.ValueText />
33 </StyledProgress.Circle>
34 </Show>
35 <StyledProgress.ValueText />
36 </StyledProgress.Root>
37 )
38}