UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

32 lines (29 loc) 1.34 kB
import { createMemoStyles } from '../../theme/create-memo-styles.js'; import { getSizeValue } from '../../theme/utils/get-size-value/get-size-value.js'; import { getThemeColor } from '../../theme/utils/get-theme-color/get-theme-color.js'; const sizes = { xs: 3, sm: 5, md: 8, lg: 12, xl: 16 }; var useStyles = createMemoStyles({ root: ({ radius, size, theme }) => ({ height: getSizeValue({ size, sizes }), backgroundColor: theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[2], borderRadius: getSizeValue({ size: radius, sizes: theme.radius }), overflow: "hidden" }), bar: ({ theme, color, radius, reduceMotion, striped }) => ({ height: "100%", backgroundColor: getThemeColor({ theme, color, shade: theme.colorScheme === "dark" ? 4 : 6 }), borderRadius: getSizeValue({ size: radius, sizes: theme.radius }), transition: reduceMotion ? "none" : `width 200ms ${theme.transitionTimingFunction}`, backgroundSize: [theme.spacing.md, theme.spacing.md], backgroundImage: striped ? "linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent)" : "none" }) }); export default useStyles; export { sizes }; //# sourceMappingURL=Progress.styles.js.map