Add styled component rule (#1261)

* Add StyledComponent rule

* update doc

* update doc

* update doc
This commit is contained in:
Weiko
2023-08-17 20:58:02 -07:00
committed by GitHub
parent 390e70a196
commit 9b34a0ff3d
70 changed files with 433 additions and 354 deletions

View File

@ -3,7 +3,7 @@ import styled from '@emotion/styled';
import { Step, StepProps } from './Step';
const Container = styled.div`
const StyledContainer = styled.div`
display: flex;
flex: 1;
justify-content: space-between;
@ -16,7 +16,7 @@ export type StepsProps = React.PropsWithChildren &
export const StepBar = ({ children, activeStep, ...restProps }: StepsProps) => {
return (
<Container {...restProps}>
<StyledContainer {...restProps}>
{React.Children.map(children, (child, index) => {
if (!React.isValidElement(child)) {
return null;
@ -35,7 +35,7 @@ export const StepBar = ({ children, activeStep, ...restProps }: StepsProps) => {
isLast: index === React.Children.count(children) - 1,
});
})}
</Container>
</StyledContainer>
);
};