@ramses-superapp/ramses-ui
Version:
Skinless UI primitives for Ramses Built Apps
24 lines (23 loc) • 595 B
JavaScript
;
import { forwardRef } from 'react';
import { View } from 'react-native';
import { jsx as _jsx } from "react/jsx-runtime";
const RsProgressBar = /*#__PURE__*/forwardRef(({
progress,
style
}, ref) => {
const clamped = Math.min(1, Math.max(0, progress));
return /*#__PURE__*/_jsx(View, {
ref: ref,
style: style,
children: /*#__PURE__*/_jsx(View, {
style: {
width: `${clamped * 100}%`,
height: '100%'
}
})
});
});
RsProgressBar.displayName = 'RsProgressBar';
export default RsProgressBar;
//# sourceMappingURL=RsProgressBar.js.map