|
| 1 | +import { JSSTheme } from '../../interfaces/JSSTheme'; |
| 2 | + |
| 3 | +//todo use theme colors when available |
| 4 | +export const styles = ({ parameters }: JSSTheme) => ({ |
| 5 | + '@keyframes scroll': { |
| 6 | + '0%': { backgroundPosition: '-100% 0' }, |
| 7 | + '100%': { backgroundPosition: '200% 0' } |
| 8 | + }, |
| 9 | + loader: { |
| 10 | + height: '0.25rem', |
| 11 | + width: '100%', |
| 12 | + '&$loaderDeterminate': { |
| 13 | + background: `linear-gradient(to right, ${parameters.sapUiContentIconColor}, ${parameters.sapUiContentIconColor})`, |
| 14 | + backgroundColor: 'rgba(8, 84, 160, 0.15)', |
| 15 | + backgroundRepeat: 'repeat-y' |
| 16 | + }, |
| 17 | + '&$loaderIndeterminate': { |
| 18 | + background: `linear-gradient( |
| 19 | + to right, |
| 20 | + rgba(8, 84, 160, 0) 0px, |
| 21 | + rgba(8, 84, 160, 1) calc(50% - 2rem), |
| 22 | + ${parameters.sapUiContentIconColor} calc(50% - 2rem), |
| 23 | + ${parameters.sapUiContentIconColor} calc(50% + 2rem), |
| 24 | + rgba(8, 84, 160, 1) calc(50% + 2rem), |
| 25 | + rgba(8, 84, 160, 0) 100% |
| 26 | + )`, |
| 27 | + backgroundColor: 'rgba(8, 84, 160, 0.15)', |
| 28 | + backgroundSize: '40%', |
| 29 | + backgroundRepeat: 'repeat-y', |
| 30 | + animation: '$scroll 1.2s linear infinite' |
| 31 | + } |
| 32 | + }, |
| 33 | + loaderDeterminate: {}, |
| 34 | + loaderIndeterminate: {} |
| 35 | +}); |
0 commit comments