Skip to content

Commit

Permalink
fix(steps): change steps style (#1733)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxingzhi committed Dec 28, 2021
1 parent 4c28824 commit 87eff12
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/steps/Steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export const Steps = WithRef<

return (
<StepsContext.Provider value={{ activeValue }}>
<div className={tabClasses} data-testid="steps" ref={ref} {...restProps}>
<div data-testid="tablist" className={`${prefixCls}-tablist`}>
<div className={tabClasses} data-testid="steps" ref={ref} {...restProps}>
<div data-testid="tablist" className={`${prefixCls}-tablist steps-container`}>
{tabs}
</div>
<div data-testid="tabpanels" className={`${prefixCls}-tabpanels`}>
Expand Down
4 changes: 2 additions & 2 deletions src/steps/demos/Steps.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ Demo.args = {
// default
export const Default = Template.bind({});
Default.args = {
className: 'cc',
className: 'steps',
defaultValue: 3,
onChange: action('onchange'),
};
// have children
export const HaveChildren = childrenTemplate.bind({});
HaveChildren.args = {
className: 'cc',
className: 'steps',
defaultValue: 1,
onChange: action('onchange'),
};
3 changes: 1 addition & 2 deletions src/steps/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface StepsProps {
*/
defaultValue?: React.Key;
/**
初始化选中面板的 `key`
初始化选中面板的 `key`,默认从1开始,一定要注意!!!
*/
current?: number;
/**
Expand All @@ -26,4 +26,3 @@ export interface StepsProps {
*/
size?: 'small' | 'normal';
}

4 changes: 3 additions & 1 deletion src/steps/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
@tabs-prefix-cls: ~'@{component-prefix}-tabs';

.@{tabs-prefix-cls} {
&-tablist {
&-tablist.steps-container {
display: flex;
}
&-tablist {
&-stepbar {
flex: 1;
& > button {
Expand Down

1 comment on commit 87eff12

@vercel
Copy link

@vercel vercel bot commented on 87eff12 Dec 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.