@react-three/uikit-apfel
Version:
Apfel kit for @react-three/uikit
8 lines (7 loc) • 546 B
JavaScript
import { Container } from '@react-three/uikit';
import React, { forwardRef } from 'react';
import { colors } from './theme.js';
export const Progress = forwardRef(({ value = 0, ...props }, ref) => {
return (React.createElement(Container, { width: "100%", height: 4, borderRadius: 2, backgroundColor: colors.foreground, backgroundOpacity: 0.2, ref: ref, ...props },
React.createElement(Container, { backgroundColor: colors.foreground, backgroundOpacity: 0.8, minWidth: 4, width: `${value * 100}%`, height: 4, borderRadius: 2 })));
});