Skip to content

Commit

Permalink
fix(gradient-direction): deprecated prop
Browse files Browse the repository at this point in the history
  • Loading branch information
danilowoz committed Mar 8, 2024
1 parent d4d23f8 commit 037ef70
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
6 changes: 0 additions & 6 deletions src/web/Svg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const SVG: React.FC<IContentLoaderProps> = ({
foregroundColor = '#eee',
foregroundOpacity = 1,
gradientRatio = 2,
gradientDirection = 'left-right',
uniqueKey,
rtl = false,
speed = 1.2,
Expand All @@ -30,11 +29,6 @@ const SVG: React.FC<IContentLoaderProps> = ({
const rtlStyle = rtl ? { transform: 'scaleX(-1)' } : null
const dur = `${speed}s`


// @deprecated
const gradientTransform =
gradientDirection === 'top-bottom' ? 'rotate(90)' : undefined

const from = `${gradientRatio * -1} 0`
const to = `${gradientRatio} 0`

Expand Down
7 changes: 0 additions & 7 deletions src/web/__tests__/ContentLoader.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ describe('ContentLoader', () => {
foregroundColor="#fff"
foregroundOpacity={0.12}
gradientRatio={0.5}
gradientDirection="top-bottom"
height={200}
preserveAspectRatio="xMaxYMax meet"
rtl
Expand Down Expand Up @@ -83,12 +82,6 @@ describe('ContentLoader', () => {
expect(propsFromFullfield.gradientRatio).toBe(0.5)
})

it("`gradientDirection` is a string and it's used", () => {
// custom props
expect(typeof propsFromFullfield.gradientDirection).toBe('string')
expect(propsFromFullfield.gradientDirection).toBe('top-bottom')
})

it("`animate` is a boolean and it's used", () => {
// custom props
expect(typeof propsFromFullfield.animate).toBe('boolean')
Expand Down
1 change: 0 additions & 1 deletion src/web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export interface IContentLoaderProps extends SVGAttributes<SVGElement> {
foregroundColor?: string
foregroundOpacity?: number
gradientRatio?: number
gradientDirection?: 'left-right' | 'top-bottom'
rtl?: boolean
speed?: number
title?: string
Expand Down

0 comments on commit 037ef70

Please sign in to comment.