-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove antd progress (#19953)
- Loading branch information
Showing
17 changed files
with
84 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+292 Bytes
(100%)
frontend/__snapshots__/scenes-other-signup--cloud--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+298 Bytes
(100%)
frontend/__snapshots__/scenes-other-signup--self-hosted--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+296 Bytes
(100%)
frontend/__snapshots__/scenes-other-signup--self-hosted-sso--dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
frontend/src/lib/lemon-ui/LemonProgress/LemonProgress.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Meta, StoryFn } from '@storybook/react' | ||
|
||
import { LemonProgress } from './LemonProgress' | ||
|
||
const meta: Meta<typeof LemonProgress> = { | ||
title: 'Lemon UI/Lemon Progress', | ||
component: LemonProgress, | ||
args: { | ||
percent: 30, | ||
}, | ||
tags: ['autodocs'], | ||
} | ||
export default meta | ||
|
||
export const Variations: StoryFn<typeof LemonProgress> = () => { | ||
return ( | ||
<div className="min-w-120"> | ||
<LemonProgress percent={30} /> | ||
<LemonProgress percent={75} strokeColor="var(--warning)" /> | ||
<LemonProgress percent={50} size="large" strokeColor="purple" /> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import clsx from 'clsx' | ||
|
||
export type LemonProgressProps = { | ||
size?: 'medium' | 'large' | ||
strokeColor?: string | ||
percent: number | ||
children?: React.ReactNode | ||
className?: string | ||
} | ||
|
||
export const LemonProgress = ({ | ||
size = 'medium', | ||
percent, | ||
strokeColor = 'var(--brand-blue)', | ||
children, | ||
className, | ||
}: LemonProgressProps): JSX.Element => { | ||
return ( | ||
<div | ||
className={clsx( | ||
'LemonProgress rounded-full w-full inline-block bg-bg-3000', | ||
size === 'large' ? 'h-5' : 'h-1.5', | ||
className | ||
)} | ||
> | ||
<span | ||
className={clsx( | ||
'LemonProgress__track block h-full rounded-full transition-all', | ||
percent > 0 ? (size === 'large' ? 'min-w-5' : 'min-w-1.5') : null | ||
)} | ||
// eslint-disable-next-line react/forbid-dom-props | ||
style={{ width: `${percent}%`, backgroundColor: strokeColor }} | ||
> | ||
{children} | ||
</span> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './LemonProgress' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters