Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: animation behaviour #46

Merged
merged 1 commit into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/components/ProgressBar/ProgressBar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tremor Raw ProgressBar [v0.0.0]
// Tremor Raw ProgressBar [v0.0.1]

import React from "react"
import { tv, type VariantProps } from "tailwind-variants"
Expand Down Expand Up @@ -79,10 +79,14 @@ const ProgressBar = React.forwardRef<HTMLDivElement, ProgressBarProps>(
aria-valuemax={max}
>
<div
className={cx("h-full flex-col rounded-full", bar())}
className={cx(
"h-full flex-col rounded-full",
bar(),
showAnimation &&
"transform-gpu transition-all duration-300 ease-in-out",
)}
style={{
width: max ? `${(safeValue / max) * 100}%` : `${safeValue}%`,
transition: showAnimation ? "all 1s" : "",
}}
/>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/ProgressBar/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Tremor Raw ProgressBar Changelog

## 0.0.0
## 0.0.1

### Changes

- Fix: Animation behaviour
5 changes: 3 additions & 2 deletions src/components/ProgressCircle/ProgressCircle.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tremor Raw ProgressCircle [v0.0.0]
// Tremor Raw ProgressCircle [v0.0.1]

import React from "react"
import { tv, VariantProps } from "tailwind-variants"
Expand Down Expand Up @@ -113,7 +113,8 @@ const ProgressCircle = React.forwardRef<SVGSVGElement, ProgressCircleProps>(
className={cx(
"transition-colors ease-linear",
circle(),
showAnimation && "transition-all duration-300 ease-in-out",
showAnimation &&
"transform-gpu transition-all duration-300 ease-in-out",
)}
/>
) : null}
Expand Down
4 changes: 3 additions & 1 deletion src/components/ProgressCircle/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Tremor Raw ProgressCircle Changelog

## 0.0.0
## 0.0.1

### Changes

- Fix: Animation behaviour