react-miui 0.22.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/components/form/Checkbox.js.map +1 -1
- package/dist/components/form/Label.js.map +1 -1
- package/dist/components/form/Toggle.js.map +1 -1
- package/dist/components/form/choice/Choice.d.ts.map +1 -1
- package/dist/components/form/choice/Choice.js.map +1 -1
- package/dist/components/form/input/Input.d.ts.map +1 -1
- package/dist/components/form/input/Input.js +1 -1
- package/dist/components/form/input/Input.js.map +1 -1
- package/dist/components/form/textarea/TextArea.styled.d.ts.map +1 -1
- package/dist/components/form/textarea/TextArea.styled.js.map +1 -1
- package/dist/components/layout/card/Card.js.map +1 -1
- package/dist/components/layout/header/Header.js.map +1 -1
- package/dist/components/layout/header/HeaderIconAction.js.map +1 -1
- package/dist/components/layout/header/StickyHeader.d.ts.map +1 -1
- package/dist/components/layout/header/StickyHeader.js.map +1 -1
- package/dist/components/layout/table/Table.js.map +1 -1
- package/dist/components/ui/action/Action.d.ts +1 -0
- package/dist/components/ui/action/Action.d.ts.map +1 -1
- package/dist/components/ui/action/EqualActions.d.ts.map +1 -1
- package/dist/components/ui/action/EqualActions.js.map +1 -1
- package/dist/components/ui/directionPad/Pad.d.ts.map +1 -1
- package/dist/components/ui/directionPad/Pad.js.map +1 -1
- package/dist/components/ui/keyValue/KeyValue.js.map +1 -1
- package/dist/components/ui/modal/Modal.d.ts.map +1 -1
- package/dist/components/ui/modal/Modal.js.map +1 -1
- package/dist/components/ui/modal/ModalButton.js.map +1 -1
- package/dist/components/ui/pop/Pop.d.ts.map +1 -1
- package/dist/components/ui/pop/Pop.js.map +1 -1
- package/dist/components/ui/stats/Stats.js.map +1 -1
- package/dist/components/ui/tabs/Item.js.map +1 -1
- package/dist/components/ui/tabs/Selector.d.ts.map +1 -1
- package/dist/components/ui/tabs/Selector.js.map +1 -1
- package/dist/components/ui/toaster/Notification.js.map +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Drawer.html +30 -30
- package/docs/classes/Pop.html +32 -32
- package/docs/classes/ToasterProvider.html +29 -29
- package/docs/enums/ICON.html +14 -14
- package/docs/functions/Action.html +8 -7
- package/docs/functions/Button.html +8 -7
- package/docs/functions/Card.html +6 -5
- package/docs/functions/Checkbox.html +6 -5
- package/docs/functions/Choice.html +6 -5
- package/docs/functions/CoveringLoader.html +6 -5
- package/docs/functions/DirectionPad.html +6 -5
- package/docs/functions/EqualActions.html +6 -5
- package/docs/functions/FullLoader.html +6 -5
- package/docs/functions/HandleEsc.html +6 -5
- package/docs/functions/Header.html +6 -5
- package/docs/functions/HeaderIconAction.html +6 -5
- package/docs/functions/Icon-1.html +6 -5
- package/docs/functions/If.html +6 -5
- package/docs/functions/Input.html +6 -5
- package/docs/functions/KeyValue.html +6 -5
- package/docs/functions/Label.html +6 -5
- package/docs/functions/List-1.html +6 -5
- package/docs/functions/Loader.html +6 -5
- package/docs/functions/Loading.html +6 -5
- package/docs/functions/Message.html +8 -7
- package/docs/functions/Modal-1.html +6 -5
- package/docs/functions/ModalButtons.html +8 -7
- package/docs/functions/PopLoader.html +6 -5
- package/docs/functions/PopOption.html +6 -5
- package/docs/functions/SearchContainer.html +6 -5
- package/docs/functions/Section.html +8 -7
- package/docs/functions/Select.html +8 -7
- package/docs/functions/Selector.html +6 -5
- package/docs/functions/Spacer.html +6 -5
- package/docs/functions/Stats.html +6 -5
- package/docs/functions/StickyHeader-1.html +6 -5
- package/docs/functions/StickyHeader.Content.html +5 -5
- package/docs/functions/Table.html +6 -5
- package/docs/functions/TextArea.html +6 -5
- package/docs/functions/Toggle.html +6 -5
- package/docs/functions/getCssText.html +6 -5
- package/docs/functions/styled.html +6 -5
- package/docs/functions/useToaster.html +6 -5
- package/docs/index.html +5 -4
- package/docs/interfaces/ActionProps.html +122 -0
- package/docs/modules/List.html +7 -7
- package/docs/modules/Modal.html +6 -6
- package/docs/modules/StickyHeader.html +6 -6
- package/docs/modules.html +9 -4
- package/docs/pages/tutorials/Test.html +5 -4
- package/docs/types/ThemeCSS.html +6 -5
- package/docs/variables/List.Header.html +5 -5
- package/docs/variables/List.Item.html +5 -5
- package/docs/variables/Modal.RemovePadding.html +5 -5
- package/docs/variables/cssReset.html +6 -5
- package/docs/variables/miuiScrollbars.html +6 -5
- package/esm/components/form/Checkbox.js.map +1 -1
- package/esm/components/form/Label.js.map +1 -1
- package/esm/components/form/Toggle.js.map +1 -1
- package/esm/components/form/choice/Choice.d.ts.map +1 -1
- package/esm/components/form/choice/Choice.js.map +1 -1
- package/esm/components/form/input/Input.d.ts.map +1 -1
- package/esm/components/form/input/Input.js +1 -1
- package/esm/components/form/input/Input.js.map +1 -1
- package/esm/components/form/input/Input.stories.js +1 -1
- package/esm/components/form/textarea/TextArea.js +1 -1
- package/esm/components/form/textarea/TextArea.styled.d.ts.map +1 -1
- package/esm/components/form/textarea/TextArea.styled.js +2 -2
- package/esm/components/form/textarea/TextArea.styled.js.map +1 -1
- package/esm/components/layout/card/Card.js.map +1 -1
- package/esm/components/layout/header/Header.js.map +1 -1
- package/esm/components/layout/header/HeaderIconAction.js.map +1 -1
- package/esm/components/layout/header/StickyHeader.d.ts.map +1 -1
- package/esm/components/layout/header/StickyHeader.js.map +1 -1
- package/esm/components/layout/table/Table.js.map +1 -1
- package/esm/components/ui/action/Action.d.ts +1 -0
- package/esm/components/ui/action/Action.d.ts.map +1 -1
- package/esm/components/ui/action/EqualActions.d.ts.map +1 -1
- package/esm/components/ui/action/EqualActions.js.map +1 -1
- package/esm/components/ui/directionPad/Pad.d.ts.map +1 -1
- package/esm/components/ui/directionPad/Pad.js.map +1 -1
- package/esm/components/ui/keyValue/KeyValue.js.map +1 -1
- package/esm/components/ui/modal/Modal.d.ts.map +1 -1
- package/esm/components/ui/modal/Modal.js +1 -1
- package/esm/components/ui/modal/Modal.js.map +1 -1
- package/esm/components/ui/modal/Modal.stories.js +1 -1
- package/esm/components/ui/modal/ModalButton.js.map +1 -1
- package/esm/components/ui/modal/ModalButtons.styled.js +1 -1
- package/esm/components/ui/pop/Pop.d.ts.map +1 -1
- package/esm/components/ui/pop/Pop.js.map +1 -1
- package/esm/components/ui/stats/Stats.js.map +1 -1
- package/esm/components/ui/tabs/Item.js.map +1 -1
- package/esm/components/ui/tabs/Selector.d.ts.map +1 -1
- package/esm/components/ui/tabs/Selector.js.map +1 -1
- package/esm/components/ui/toaster/Notification.js.map +1 -1
- package/package.json +17 -16
- package/pnpm-lock.yaml +11957 -0
- package/src/components/form/Checkbox.tsx +5 -5
- package/src/components/form/Label.tsx +1 -1
- package/src/components/form/Toggle.tsx +1 -1
- package/src/components/form/choice/Choice.tsx +3 -2
- package/src/components/form/input/Input.tsx +2 -1
- package/src/components/form/textarea/TextArea.styled.ts +1 -0
- package/src/components/layout/card/Card.tsx +1 -1
- package/src/components/layout/header/Header.tsx +4 -4
- package/src/components/layout/header/HeaderIconAction.tsx +1 -1
- package/src/components/layout/header/StickyHeader.tsx +1 -0
- package/src/components/layout/table/Table.tsx +4 -4
- package/src/components/ui/action/Action.tsx +2 -0
- package/src/components/ui/action/EqualActions.tsx +2 -1
- package/src/components/ui/directionPad/Pad.tsx +1 -0
- package/src/components/ui/keyValue/KeyValue.tsx +2 -2
- package/src/components/ui/modal/Modal.tsx +0 -1
- package/src/components/ui/modal/ModalButton.tsx +1 -1
- package/src/components/ui/pop/Pop.tsx +1 -0
- package/src/components/ui/stats/Stats.tsx +1 -1
- package/src/components/ui/tabs/Item.tsx +1 -1
- package/src/components/ui/tabs/Selector.tsx +1 -0
- package/src/components/ui/toaster/Notification.tsx +1 -1
- package/src/demo/Demo.tsx +3 -3
- package/src/demo/Main.tsx +4 -3
- package/src/demo/components/form/Choice.tsx +3 -3
- package/src/demo/components/layout/header/StickyHeader.tsx +1 -1
- package/src/demo/components/ui/action/Action.tsx +4 -4
- package/src/demo/components/ui/stats/Stats.tsx +2 -2
- package/src/pages/_app.tsx +2 -1
|
@@ -22,14 +22,14 @@ const Checkbox: React.FC<Props> = (props) => {
|
|
|
22
22
|
props.color && (style.color = props.color);
|
|
23
23
|
|
|
24
24
|
const cls = classnames(props.className, styles.checkbox, {
|
|
25
|
-
[styles.disabled]: props.disabled,
|
|
26
|
-
[styles.readOnly]: props.readOnly,
|
|
25
|
+
[styles.disabled as string]: props.disabled,
|
|
26
|
+
[styles.readOnly as string]: props.readOnly,
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
const checkmarkCls = classnames(styles.checkmark, {
|
|
30
|
-
[styles.checkmarkDisabled]: props.disabled,
|
|
31
|
-
[styles.checkmarkChecked]: props.checked,
|
|
32
|
-
[styles.checkmarkReadOnly]: props.readOnly,
|
|
30
|
+
[styles.checkmarkDisabled as string]: props.disabled,
|
|
31
|
+
[styles.checkmarkChecked as string]: props.checked,
|
|
32
|
+
[styles.checkmarkReadOnly as string]: props.readOnly,
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
return (
|
|
@@ -17,7 +17,7 @@ const Label: React.FC<Props> = (props) => {
|
|
|
17
17
|
const v = makeVariants(props.variant);
|
|
18
18
|
|
|
19
19
|
const labelCls = classnames(styles.text, {
|
|
20
|
-
[styles.textBig]: v.includes("big"),
|
|
20
|
+
[styles.textBig as string]: v.includes("big"),
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
const label = props.label ? <div className={labelCls}>{props.label}</div> : null;
|
|
@@ -7,6 +7,7 @@ import type { ObjectValue, Value } from "../../../types/form";
|
|
|
7
7
|
import { makeVariants, toObjectValue } from "../../../utils/index.js";
|
|
8
8
|
|
|
9
9
|
import { ChoiceItem } from "./ChoiceItem.js";
|
|
10
|
+
|
|
10
11
|
import styles from "./Choice.module.scss";
|
|
11
12
|
|
|
12
13
|
type Variant = "wide" | "left";
|
|
@@ -41,8 +42,8 @@ const Choice = <T extends string>(props: Props<T>): ReturnType<React.FC<Props<T>
|
|
|
41
42
|
|
|
42
43
|
const cls = classnames(
|
|
43
44
|
styles.choice, props.className,
|
|
44
|
-
{ [styles.wide]: v.includes("wide") },
|
|
45
|
-
{ [styles.left]: v.includes("left") },
|
|
45
|
+
{ [styles.wide as string]: v.includes("wide") },
|
|
46
|
+
{ [styles.left as string]: v.includes("left") },
|
|
46
47
|
);
|
|
47
48
|
|
|
48
49
|
return <div className={cls}>{opts}</div>;
|
|
@@ -4,9 +4,10 @@ import type { ObjectValue, Value } from "../../../types/form";
|
|
|
4
4
|
|
|
5
5
|
import { Suggestions } from "../Suggestions.js";
|
|
6
6
|
|
|
7
|
-
import styles from "./Input.module.scss";
|
|
8
7
|
import { StyledInput, StyledWrapper, StyledPrefix, StyledSuffix } from "./Input.styled";
|
|
9
8
|
|
|
9
|
+
import styles from "./Input.module.scss";
|
|
10
|
+
|
|
10
11
|
interface CustomProps<T extends string> {
|
|
11
12
|
children?: never;
|
|
12
13
|
prefix?: React.ReactNode;
|
|
@@ -17,7 +17,7 @@ interface Props {
|
|
|
17
17
|
const Card: React.FC<Props> = (props) => {
|
|
18
18
|
const v = makeVariants(props.variant);
|
|
19
19
|
const cls = classnames(props.className, styles.card, {
|
|
20
|
-
[styles.margin]: v.includes("margin"),
|
|
20
|
+
[styles.margin as string]: v.includes("margin"),
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
// @TODO auto wrap some children in Section
|
|
@@ -31,15 +31,15 @@ const Header: React.FC<Props> = (props) => {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
const cls = classnames(styles.header, {
|
|
34
|
-
[styles["header--center"]]: center,
|
|
35
|
-
[styles["header--toolbar"]]: variant === "toolbar",
|
|
36
|
-
[styles["header--colored"]]: variant === "colored",
|
|
34
|
+
[styles["header--center"] as string]: center,
|
|
35
|
+
[styles["header--toolbar"] as string]: variant === "toolbar",
|
|
36
|
+
[styles["header--colored"] as string]: variant === "colored",
|
|
37
37
|
}, styles[`header--${position}`], props.className);
|
|
38
38
|
|
|
39
39
|
let contents = children;
|
|
40
40
|
if (justActions) {
|
|
41
41
|
const mode = position === "top" || position === "bottom" ? "horizontal" : "vertical";
|
|
42
|
-
contents = <EqualActions className={styles.actions} mode={mode}>{contents}</EqualActions>;
|
|
42
|
+
contents = <EqualActions className={styles.actions as string} mode={mode}>{contents}</EqualActions>;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
let before: ReactNode;
|
|
@@ -29,7 +29,7 @@ const HeaderIconAction: React.FC<Props> = (props) => {
|
|
|
29
29
|
|
|
30
30
|
let content: ReactNode = icon;
|
|
31
31
|
if (typeof icon === "string") {
|
|
32
|
-
content = <Icon className={styles.icon} name={icon as ICON} />;
|
|
32
|
+
content = <Icon className={styles.icon as string} name={icon as ICON} />;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
if (to) {
|
|
@@ -18,10 +18,10 @@ const Table: React.FC<React.TableHTMLAttributes<HTMLTableElement> & Props> = (
|
|
|
18
18
|
const v = makeVariants(variant);
|
|
19
19
|
|
|
20
20
|
const cls = classnames(className, {
|
|
21
|
-
[styles.table]: !v.includes("raw"),
|
|
22
|
-
[styles.striped]: v.includes("striped"),
|
|
23
|
-
[styles.wide]: v.includes("wide"),
|
|
24
|
-
[styles.centered]: v.includes("centered"),
|
|
21
|
+
[styles.table as string]: !v.includes("raw"),
|
|
22
|
+
[styles.striped as string]: v.includes("striped"),
|
|
23
|
+
[styles.wide as string]: v.includes("wide"),
|
|
24
|
+
[styles.centered as string]: v.includes("centered"),
|
|
25
25
|
});
|
|
26
26
|
return <table className={cls} {...props}>{children}</table>;
|
|
27
27
|
};
|
|
@@ -3,6 +3,7 @@ import React from "react";
|
|
|
3
3
|
import classnames from "classnames";
|
|
4
4
|
|
|
5
5
|
import { Action } from "./Action.js";
|
|
6
|
+
|
|
6
7
|
import styles from "./EqualActions.module.scss";
|
|
7
8
|
|
|
8
9
|
interface Props {
|
|
@@ -23,7 +24,7 @@ const EqualActions: React.FC<Props> = (props) => {
|
|
|
23
24
|
"--actions-count": React.Children.count(props.children),
|
|
24
25
|
} as React.CSSProperties;
|
|
25
26
|
|
|
26
|
-
const cls = classnames(styles.actions, props.className, { [styles.vertical]: props.mode === "vertical" });
|
|
27
|
+
const cls = classnames(styles.actions, props.className, { [styles.vertical as string]: props.mode === "vertical" });
|
|
27
28
|
|
|
28
29
|
return (
|
|
29
30
|
<div className={cls} style={style}>
|
|
@@ -25,8 +25,8 @@ const KeyValue: React.FC<Props> = (props) => {
|
|
|
25
25
|
const isFirstRow = key < cols;
|
|
26
26
|
const isFirstCol = (key % cols) === 0;
|
|
27
27
|
const className = classnames(styles.item, {
|
|
28
|
-
[styles.itemNotFirstRow]: !isFirstRow,
|
|
29
|
-
[styles.itemNotFirstCol]: !isFirstCol,
|
|
28
|
+
[styles.itemNotFirstRow as string]: !isFirstRow,
|
|
29
|
+
[styles.itemNotFirstCol as string]: !isFirstCol,
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
const kvKey = value.key != null ? <div className={styles.key}>{value.key}</div> : null;
|
|
@@ -128,7 +128,6 @@ const Modal: React.FC<Props> & SubComponents = ({
|
|
|
128
128
|
const chld = React.Children.map(children, (child, index) => {
|
|
129
129
|
if (React.isValidElement(child)) {
|
|
130
130
|
if (child.type === RemovePadding) {
|
|
131
|
-
// eslint-disable-next-line max-len
|
|
132
131
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access
|
|
133
132
|
const css: ThemeCSS = child.props.css ?? {};
|
|
134
133
|
if (index === 0 && titleElem == null) {
|
|
@@ -18,7 +18,7 @@ const ModalButton: React.FC<React.ButtonHTMLAttributes<HTMLButtonElement> & Prop
|
|
|
18
18
|
const v = makeVariants(variant);
|
|
19
19
|
|
|
20
20
|
const cls = classnames(styles.button, {
|
|
21
|
-
[styles.buttonMain]: v.includes("main"),
|
|
21
|
+
[styles.buttonMain as string]: v.includes("main"),
|
|
22
22
|
}, className);
|
|
23
23
|
|
|
24
24
|
return <button {...props} className={cls}>{children}</button>;
|
|
@@ -18,7 +18,7 @@ const Item: React.FC<Props> = (props) => {
|
|
|
18
18
|
}, [props.onClick, props.value.value, props.value.label]);
|
|
19
19
|
|
|
20
20
|
const cls = classnames(styles.button, {
|
|
21
|
-
[styles.active]: props.active,
|
|
21
|
+
[styles.active as string]: props.active,
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
return <button onClick={handleClick} className={cls} type={"button"}>{props.value.label}</button>;
|
|
@@ -25,7 +25,7 @@ const Notification: React.FC<Props> = (props) => {
|
|
|
25
25
|
return (
|
|
26
26
|
<div
|
|
27
27
|
className={classnames(styles.toast, {
|
|
28
|
-
[styles.hide]: props.toast.hide || forceHide,
|
|
28
|
+
[styles.hide as string]: props.toast.hide || forceHide,
|
|
29
29
|
})}
|
|
30
30
|
key={props.toast.id}
|
|
31
31
|
onTransitionEnd={handleRemove}
|
package/src/demo/Demo.tsx
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import "@icon-park/react/styles/index.css";
|
|
4
|
-
|
|
5
3
|
import { ToasterProvider } from "../components/ui/toaster/Toaster.js";
|
|
6
4
|
|
|
7
|
-
import styles from "./Demo.module.scss";
|
|
8
5
|
import { Menu } from "./Menu.js";
|
|
9
6
|
import { Main } from "./Main.js";
|
|
10
7
|
import { componentsMap } from "./componentsMap.js";
|
|
11
8
|
|
|
9
|
+
import "@icon-park/react/styles/index.css";
|
|
10
|
+
import styles from "./Demo.module.scss";
|
|
11
|
+
|
|
12
12
|
const Demo: React.FC = (props) => {
|
|
13
13
|
return (
|
|
14
14
|
<ToasterProvider>
|
package/src/demo/Main.tsx
CHANGED
|
@@ -7,10 +7,11 @@ import type { TheMap, TheMapItem } from "./componentsMap";
|
|
|
7
7
|
|
|
8
8
|
import { Choice } from "../components/form/choice/Choice.js";
|
|
9
9
|
|
|
10
|
-
import styles from "./Main.module.scss";
|
|
11
10
|
import { safeUseHash } from "./utils/safeUseHash.js";
|
|
12
11
|
import { componentsMap } from "./componentsMap.js";
|
|
13
12
|
|
|
13
|
+
import styles from "./Main.module.scss";
|
|
14
|
+
|
|
14
15
|
type BG = "white" | "transparent" | "mobile";
|
|
15
16
|
|
|
16
17
|
interface ComponentInfo {
|
|
@@ -64,8 +65,8 @@ const Main: React.FC = (props) => {
|
|
|
64
65
|
const Component = info.Component;
|
|
65
66
|
|
|
66
67
|
const componentCls = classnames(styles.component, {
|
|
67
|
-
[styles["component--transparent"]]: bg === "transparent",
|
|
68
|
-
[styles["component--mobile"]]: bg === "mobile",
|
|
68
|
+
[styles["component--transparent"] as string]: bg === "transparent",
|
|
69
|
+
[styles["component--mobile"] as string]: bg === "mobile",
|
|
69
70
|
});
|
|
70
71
|
|
|
71
72
|
return (
|
|
@@ -9,7 +9,7 @@ interface Props {}
|
|
|
9
9
|
const values: ("Single" | "Multiple words")[] = ["Single", "Multiple words"];
|
|
10
10
|
|
|
11
11
|
const ChoiceDemo: React.FC<Props> = () => {
|
|
12
|
-
const [current, handleCurrent] = useState(values[0]);
|
|
12
|
+
const [current, handleCurrent] = useState(values[0]!);
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
15
|
<Section vertical={true} horizontal={true}>
|
|
@@ -30,7 +30,7 @@ const values2 = [
|
|
|
30
30
|
];
|
|
31
31
|
|
|
32
32
|
const ChoiceDemo2: React.FC<Props> = () => {
|
|
33
|
-
const [current, handleCurrent] = useState(values2[0]
|
|
33
|
+
const [current, handleCurrent] = useState(values2[0]!.value);
|
|
34
34
|
|
|
35
35
|
return (
|
|
36
36
|
<>
|
|
@@ -40,7 +40,7 @@ const ChoiceDemo2: React.FC<Props> = () => {
|
|
|
40
40
|
value={current}
|
|
41
41
|
name={"rnd"}
|
|
42
42
|
onChange={handleCurrent}
|
|
43
|
-
className={styles.darker}
|
|
43
|
+
className={styles.darker as string}
|
|
44
44
|
variant={"wide"}
|
|
45
45
|
/>
|
|
46
46
|
|
|
@@ -32,7 +32,7 @@ const ActionDemo: React.FC = () => {
|
|
|
32
32
|
const ActionsOnLeft = () => {
|
|
33
33
|
return (
|
|
34
34
|
<StickyHeader position={"left"}>
|
|
35
|
-
<Header center={true} className={styles.header}>
|
|
35
|
+
<Header center={true} className={styles.header as string}>
|
|
36
36
|
<Action icon={ICON.checkmark} />
|
|
37
37
|
<Action icon={ICON.checkmark} />
|
|
38
38
|
<Action icon={ICON.checkmark} />
|
|
@@ -48,7 +48,7 @@ const ActionsOnLeft = () => {
|
|
|
48
48
|
const ActionsOnBottom = () => {
|
|
49
49
|
return (
|
|
50
50
|
<StickyHeader position={"bottom"}>
|
|
51
|
-
<Header center={true} className={styles.header}>
|
|
51
|
+
<Header center={true} className={styles.header as string}>
|
|
52
52
|
<Action icon={ICON.checkmark} />
|
|
53
53
|
<Action icon={ICON.checkmark} />
|
|
54
54
|
<Action icon={ICON.checkmark} />
|
|
@@ -64,14 +64,14 @@ const ActionsOnBottom = () => {
|
|
|
64
64
|
const ActionLabelsOnBottom = () => {
|
|
65
65
|
return (
|
|
66
66
|
<StickyHeader position={"bottom"}>
|
|
67
|
-
<Header center={true} className={styles.header}>
|
|
67
|
+
<Header center={true} className={styles.header as string}>
|
|
68
68
|
<Action icon={ICON.checkmark} label={"Add"} />
|
|
69
69
|
<Action icon={ICON.checkmark} label={"Delete"} />
|
|
70
70
|
<Action icon={ICON.checkmark} label={"Share on Web"} />
|
|
71
71
|
</Header>
|
|
72
72
|
<StickyHeader.Content>
|
|
73
73
|
<StickyHeader position={"top"}>
|
|
74
|
-
<Header center={true} className={styles.header}>
|
|
74
|
+
<Header center={true} className={styles.header as string}>
|
|
75
75
|
<Action icon={ICON.checkmark} label={"Add"} />
|
|
76
76
|
<Action icon={ICON.checkmark} label={"Delete"} />
|
|
77
77
|
<Action icon={ICON.checkmark} label={"Share"} />
|
|
@@ -27,7 +27,7 @@ const StatsDemo: React.FC<Props> = (props) => {
|
|
|
27
27
|
<Header
|
|
28
28
|
center={true}
|
|
29
29
|
variant={"colored"}
|
|
30
|
-
className={styles.header}
|
|
30
|
+
className={styles.header as string}
|
|
31
31
|
>
|
|
32
32
|
Battery
|
|
33
33
|
</Header>
|
|
@@ -45,7 +45,7 @@ const StatsDarkDemo = () => (
|
|
|
45
45
|
<Header
|
|
46
46
|
center={true}
|
|
47
47
|
variant={"colored"}
|
|
48
|
-
className={styles.header2}
|
|
48
|
+
className={styles.header2 as string}
|
|
49
49
|
>
|
|
50
50
|
Battery
|
|
51
51
|
</Header>
|
package/src/pages/_app.tsx
CHANGED
|
@@ -4,10 +4,11 @@ import Head from "next/head";
|
|
|
4
4
|
|
|
5
5
|
import type { AppProps } from "next/app";
|
|
6
6
|
|
|
7
|
+
import { cssReset } from "../theme.css-reset";
|
|
8
|
+
|
|
7
9
|
import "../global.scss";
|
|
8
10
|
import "../demo-global.scss";
|
|
9
11
|
import "../scrollbars.scss";
|
|
10
|
-
import { cssReset } from "../theme.css-reset";
|
|
11
12
|
|
|
12
13
|
const MyApp = ({ Component, pageProps }: AppProps) => (
|
|
13
14
|
<>
|