@yourdash/uikit 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,6 @@
|
|
11
11
|
justify-content: center;
|
12
12
|
font-family: var(#{$theme}#{$font}#{$family});
|
13
13
|
text-align: center;
|
14
|
-
min-width: 6rem;
|
15
14
|
padding: 0 var(#{$theme}#{$button}#{$padding}#{$horizontal}) 0 0;
|
16
15
|
color: var(#{$theme}#{$button}#{$color});
|
17
16
|
border: var(#{$theme}#{$button}#{$border});
|
package/components/link/link.tsx
CHANGED
@@ -9,7 +9,7 @@ import { UKIcon } from "../icon/iconDictionary.ts";
|
|
9
9
|
import styles from "./link.module.scss";
|
10
10
|
import { FC } from "react";
|
11
11
|
|
12
|
-
const Link: FC<{ text: string; to: string; className?: string; hideLinkIcon
|
12
|
+
const Link: FC<{ text: string; to: string; className?: string; hideLinkIcon?: boolean }> = (props) => {
|
13
13
|
return (
|
14
14
|
<a
|
15
15
|
href={props.to}
|
@@ -1,21 +1,29 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright ©2024 Ewsgit<https://github.com/ewsgit> and YourDash<https://github.com/yourdash> contributors.
|
3
|
-
* YourDash is licensed under the MIT License. (https://ewsgit.mit-license.org)
|
4
|
-
*/
|
5
|
-
|
6
|
-
import clippy from "@yourdash/shared/web/helpers/clippy.ts";
|
7
|
-
import styles from "./progressBar.module.scss";
|
8
|
-
import { FC } from "react";
|
9
|
-
|
10
|
-
// TODO: rewrite this component to use the HTML progress bar
|
11
|
-
const ProgressBar: FC<{ maxValue?: number; value: number; className?: string }> = ({
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
1
|
+
/*
|
2
|
+
* Copyright ©2024 Ewsgit<https://github.com/ewsgit> and YourDash<https://github.com/yourdash> contributors.
|
3
|
+
* YourDash is licensed under the MIT License. (https://ewsgit.mit-license.org)
|
4
|
+
*/
|
5
|
+
|
6
|
+
import clippy from "@yourdash/shared/web/helpers/clippy.ts";
|
7
|
+
import styles from "./progressBar.module.scss";
|
8
|
+
import { FC } from "react";
|
9
|
+
|
10
|
+
// TODO: rewrite this component to use the HTML progress bar
|
11
|
+
const ProgressBar: FC<{ maxValue?: number; value: number; className?: string; indeterminate?: boolean }> = ({
|
12
|
+
maxValue,
|
13
|
+
value,
|
14
|
+
className,
|
15
|
+
indeterminate,
|
16
|
+
}) => {
|
17
|
+
return (
|
18
|
+
<>
|
19
|
+
<progress
|
20
|
+
max={maxValue}
|
21
|
+
value={value}
|
22
|
+
className={className}
|
23
|
+
/>
|
24
|
+
{indeterminate && "This should be indeterminate"}
|
25
|
+
</>
|
26
|
+
);
|
27
|
+
};
|
28
|
+
|
29
|
+
export default ProgressBar;
|
@@ -1,17 +1,23 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright ©2024 Ewsgit<https://github.com/ewsgit> and YourDash<https://github.com/yourdash> contributors.
|
3
|
-
* YourDash is licensed under the MIT License. (https://ewsgit.mit-license.org)
|
4
|
-
*/
|
5
|
-
|
6
|
-
import { FC } from "react";
|
7
|
-
import { useNavigate } from "react-router";
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
1
|
+
/*
|
2
|
+
* Copyright ©2024 Ewsgit<https://github.com/ewsgit> and YourDash<https://github.com/yourdash> contributors.
|
3
|
+
* YourDash is licensed under the MIT License. (https://ewsgit.mit-license.org)
|
4
|
+
*/
|
5
|
+
|
6
|
+
import { FC } from "react";
|
7
|
+
import { useNavigate } from "react-router";
|
8
|
+
import Card from "../card/card.tsx";
|
9
|
+
import Text from "../text/text.tsx";
|
10
|
+
|
11
|
+
const Redirect: FC<{ to: string | null }> = (props) => {
|
12
|
+
const navigate = useNavigate();
|
13
|
+
|
14
|
+
if (props.to !== null) navigate(props.to);
|
15
|
+
|
16
|
+
return (
|
17
|
+
<Card>
|
18
|
+
<Text text={`Redirecting to ${props.to}`} />
|
19
|
+
</Card>
|
20
|
+
);
|
21
|
+
};
|
22
|
+
|
23
|
+
export default Redirect;
|