@@ -30,30 +29,18 @@ const Template: Story
= (args) => {
export const Basic = Template.bind({});
Basic.args = {
children: [
- }>
- Step 1
- ,
-
- Step 2
- ,
- }>
- Step 3
- ,
+ } />,
+ ,
+ } />,
],
};
export const Error = Template.bind({});
Error.args = {
children: [
- }>
- Step 1
- ,
-
- Step 2
- ,
- }>
- Step 3
- ,
+ } />,
+ ,
+ } />,
],
};
@@ -61,14 +48,8 @@ export const NonLinear = Template.bind({});
NonLinear.args = {
nonLinear: true,
children: [
- }>
- Step 1
- ,
-
- Step 2
- ,
- }>
- Step 3
- ,
+ } />,
+ ,
+ } />,
],
};
diff --git a/src/components/Stepper/Stepper.tsx b/src/components/Stepper/Stepper.tsx
index df9ca0f..59aa6f1 100644
--- a/src/components/Stepper/Stepper.tsx
+++ b/src/components/Stepper/Stepper.tsx
@@ -2,7 +2,6 @@ import React from 'react';
import { MdCheck } from 'react-icons/md';
import { classes } from '../../helpers';
import { lightText } from '../../helpers/color';
-import { Carousel } from '../Carousel';
import { Divider } from '../Divider';
import { Col, Row } from '../Grid';
import { Text } from '../Text';
@@ -74,7 +73,7 @@ export const Stepper: React.FC = (props) => {
onClick={() => nonLinear && !el.props.disabled && onChange(i)}
className={classes(css.number, numberCss, css.container, nonLinear && css.clickable)}
>
- {i + 1}
+ {i + 1}
);
}
@@ -116,13 +115,11 @@ export const Stepper: React.FC = (props) => {
);
})}
-
- {children.map((el) => el.props.children)}
-
+ {children[current]}
>
);
};
-export const Step: React.FC = (props) => {
- return {props.children}
;
+export const Step: React.FC = () => {
+ return ;
};
diff --git a/src/components/Tag/Tag.tsx b/src/components/Tag/Tag.tsx
index 3e40894..f77f4a0 100644
--- a/src/components/Tag/Tag.tsx
+++ b/src/components/Tag/Tag.tsx
@@ -11,7 +11,11 @@ export const Tag: React.FC = (props) => {
const { tag: tagCss, chipIcon, icon: iconCss } = style({ props, theme });
return (
- props?.onClick(e)} style={props.style}>
+ props?.onClick(e)}
+ style={props.style}
+ >
{props.icon && {props.icon}}
{props.children}
{props.chips && (
@@ -32,9 +36,11 @@ export interface TagProps {
outline?: boolean;
chips?: boolean;
icon?: React.ReactNode;
+ elevation?: number;
}
Tag.defaultProps = {
style: {},
color: '#aaa',
+ elevation: 2,
};
diff --git a/src/components/Tooltip/Tooltip.tsx b/src/components/Tooltip/Tooltip.tsx
index 602c9f0..7389c88 100644
--- a/src/components/Tooltip/Tooltip.tsx
+++ b/src/components/Tooltip/Tooltip.tsx
@@ -116,7 +116,7 @@ export const Tooltip: React.FC = (props) => {
const [referenceElement, setReferenceElement] = useState(null);
const [popperElement, setPopperElement] = useState(null);
const [arrowElement, setArrowElement] = useState(null);
- const { styles, attributes } = usePopper(referenceElement, popperElement, {
+ const { styles, attributes, forceUpdate } = usePopper(referenceElement, popperElement, {
modifiers: [{ name: 'arrow', options: { element: arrowElement } }],
placement,
});
@@ -135,6 +135,7 @@ export const Tooltip: React.FC = (props) => {
useEffect(() => {
if (visible) {
attachEvents(Array.isArray(trigger) ? trigger[0] : trigger);
+ forceUpdate?.();
updateTooltipState(true);
} else {
onClose();