Skip to content

Commit e6f9598

Browse files
committed
Change as suggested, use to get and theming implementation
1 parent 1b7151a commit e6f9598

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

redisinsight/ui/src/components/base/display/progress-bar/progress-bar-loader.styles.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { theme, useTheme } from '@redis-ui/styles'
1+
import { Theme, theme } from '@redis-ui/styles'
22
import { ReactNode } from 'react'
33
import styled, { css, keyframes } from 'styled-components'
44

@@ -39,10 +39,10 @@ export const getBarBackgroundColor = (
3939

4040
export interface MapProps extends LoaderBarProps {
4141
$color?: ColorType
42+
theme: Theme
4243
}
4344

44-
export const useColorBackgroundStyles = ({ $color }: MapProps = {}) => {
45-
const theme = useTheme()
45+
export const getColorBackgroundStyles = ({ $color, theme }: MapProps) => {
4646
const colors = theme.semantic.color
4747

4848
const getColorValue = (color?: ColorType) =>
@@ -76,7 +76,7 @@ export const LoaderContainer = styled.div<LoaderContainerProps>`
7676
`
7777

7878
export const LoaderBar = styled.div<MapProps>`
79-
${useColorBackgroundStyles}
79+
${({ $color, theme }) => getColorBackgroundStyles({ $color, theme })};
8080
8181
position: absolute;
8282
height: 100%;

0 commit comments

Comments
 (0)