antd#Steps JavaScript Examples
The following examples show how to use
antd#Steps.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: icon.jsx From virtuoso-design-system with MIT License | 6 votes |
storiesOf('antd/steps', module).add('icon', () =>
<Steps>
<Step status="finish" title="Login" icon={<UserOutlined />} />
<Step status="finish" title="Verification" icon={<SolutionOutlined />} />
<Step status="process" title="Pay" icon={<LoadingOutlined />} />
<Step status="wait" title="Done" icon={<SmileOutlined />} />
</Steps>,
{ docs: { page: () => (<><h1 id="enus">en-US</h1>
<p>You can use your own custom icons by setting the property <code>icon</code> for <code>Steps.Step</code>.</p></>) } });
Example #2
Source File: FormDemo2.js From discern with BSD 3-Clause "New" or "Revised" License | 6 votes |
render () {
return (
<div>
<CustomBreadcrumb arr={['输入', '表单','分步表单']}/>
<TypingCard source='将一个冗长或用户不熟悉的表单任务分成多个步骤,指导用户完成'/>
<Card title='分步表单' bordered={false} style={{minHeight: 600}}>
<Steps style={styles.steps} current={this.props.stepFormStore.current}>
<Step title="填写转账信息" />
<Step title="确认转账信息" />
<Step title="完成" />
</Steps>
<div>{this.showStep()}</div>
</Card>
</div>
)
}
Example #3
Source File: progress-dot.jsx From virtuoso-design-system with MIT License | 6 votes |
storiesOf('antd/steps', module).add('progress-dot', () =>
<>
<Steps progressDot current={1}>
<Step title="Finished" description="This is a description." />
<Step title="In Progress" description="This is a description." />
<Step title="Waiting" description="This is a description." />
</Steps>
<Divider />
<Steps progressDot current={1} direction="vertical">
<Step title="Finished" description="This is a description. This is a description." />
<Step title="Finished" description="This is a description. This is a description." />
<Step title="In Progress" description="This is a description. This is a description." />
<Step title="Waiting" description="This is a description." />
<Step title="Waiting" description="This is a description." />
</Steps>
</>,
{ docs: { page: () => (<><h1 id="enus">en-US</h1>
<p>Steps with progress dot style.</p></>) } });
Example #4
Source File: TableList.js From youdidao-unmanned-shop with MIT License | 6 votes |
render() {
const { updateModalVisible, handleUpdateModalVisible, values } = this.props;
const { currentStep, formVals } = this.state;
return (
<Modal
width={640}
bodyStyle={{ padding: '32px 40px 48px' }}
destroyOnClose
title="规则配置"
visible={updateModalVisible}
footer={this.renderFooter(currentStep)}
onCancel={() => handleUpdateModalVisible(false, values)}
afterClose={() => handleUpdateModalVisible()}
>
<Steps style={{ marginBottom: 28 }} size="small" current={currentStep}>
<Step title="基本信息" />
<Step title="配置规则属性" />
<Step title="设定调度周期" />
</Steps>
{this.renderContent(currentStep, formVals)}
</Modal>
);
}
Example #5
Source File: TableList.js From camel-store-admin with Apache License 2.0 | 6 votes |
render() {
const { updateModalVisible, handleUpdateModalVisible } = this.props;
const { currentStep, formVals } = this.state;
return (
<Modal
width={640}
bodyStyle={{ padding: '32px 40px 48px' }}
destroyOnClose
title="规则配置"
visible={updateModalVisible}
footer={this.renderFooter(currentStep)}
onCancel={() => handleUpdateModalVisible()}
>
<Steps style={{ marginBottom: 28 }} size="small" current={currentStep}>
<Step title="基本信息" />
<Step title="配置规则属性" />
<Step title="设定调度周期" />
</Steps>
{this.renderContent(currentStep, formVals)}
</Modal>
);
}
Example #6
Source File: step-next.jsx From virtuoso-design-system with MIT License | 6 votes |
App = () => {
const [current, setCurrent] = React.useState(0);
const next = () => {
setCurrent(current + 1);
};
const prev = () => {
setCurrent(current - 1);
};
return (
<>
<Steps current={current}>
{steps.map(item => (
<Step key={item.title} title={item.title} />
))}
</Steps>
<div className="steps-content">{steps[current].content}</div>
<div className="steps-action">
{current < steps.length - 1 && (
<Button type="primary" onClick={() => next()}>
Next
</Button>
)}
{current === steps.length - 1 && (
<Button type="primary" onClick={() => message.success('Processing complete!')}>
Done
</Button>
)}
{current > 0 && (
<Button style={{ margin: '0 8px' }} onClick={() => prev()}>
Previous
</Button>
)}
</div>
</>
);
}
Example #7
Source File: index.jsx From prometheusPro with MIT License | 6 votes |
render() {
const currentStep = this.getCurrentStep();
let stepComponent;
if (currentStep === 1) {
stepComponent = <Step2 />;
} else if (currentStep === 2) {
stepComponent = <Step3 />;
} else {
stepComponent = <Step1 />;
}
return (
<PageHeaderWrapper content="将一个冗长或用户不熟悉的表单任务分成多个步骤,指导用户完成。">
<Card bordered={false}>
<>
<Steps current={currentStep} className={styles.steps}>
<Step title="填写转账信息" />
<Step title="确认转账信息" />
<Step title="完成" />
</Steps>
{stepComponent}
</>
</Card>
</PageHeaderWrapper>
);
}
Example #8
Source File: stepComponent.js From acy-dex-interface with MIT License | 6 votes |
stepComponent = (props) => {
const [percent, setPercentage] = useState(0);
const [current, setCurrent] = useState(2);
const [status, setStatus] = useState('process');
return (
<div
className={styles.stepColor}
id="steps"
>
<Steps size="small" labelPlacement='vertical' current={current}>
<Step title="Preparation" />
<Step title="Whitelist" />
<Step title="Lottery Ticket" />
<Step title="Sale" />
<Step title="Distribution" />
</Steps>
</div>
)
}
Example #9
Source File: UpdateForm.jsx From prometheusPro with MIT License | 6 votes |
render() {
const { updateModalVisible, onCancel: handleUpdateModalVisible, values } = this.props;
const { currentStep, formVals } = this.state;
return (
<Modal
width={640}
bodyStyle={{
padding: '32px 40px 48px',
}}
destroyOnClose
title="规则配置"
visible={updateModalVisible}
footer={this.renderFooter(currentStep)}
onCancel={() => handleUpdateModalVisible(false, values)}
afterClose={() => handleUpdateModalVisible()}
>
<Steps
style={{
marginBottom: 28,
}}
size="small"
current={currentStep}
>
<Step title="基本信息" />
<Step title="配置规则属性" />
<Step title="设定调度周期" />
</Steps>
{this.renderContent(currentStep, formVals)}
</Modal>
);
}
Example #10
Source File: customized-progress-dot.jsx From virtuoso-design-system with MIT License | 6 votes |
storiesOf('antd/steps', module).add('customized-progress-dot', () =>
<Steps current={1} progressDot={customDot}>
<Step title="Finished" description="You can hover on the dot." />
<Step title="In Progress" description="You can hover on the dot." />
<Step title="Waiting" description="You can hover on the dot." />
<Step title="Waiting" description="You can hover on the dot." />
</Steps>,
{ docs: { page: () => (<><h1 id="enus">en-US</h1>
<p>You can customize the display for Steps with progress dot style.</p></>) } });
Example #11
Source File: index.jsx From prometheusPro with MIT License | 5 votes |
content = ( <> <Descriptions title="项目名称"> <Descriptions.Item label="项目 ID">23421</Descriptions.Item> <Descriptions.Item label="负责人">曲丽丽</Descriptions.Item> <Descriptions.Item label="生效时间">2016-12-12 ~ 2017-12-12</Descriptions.Item> </Descriptions> <br /> <Steps progressDot current={1}> <Step title={ <span style={{ fontSize: 14, }} > 创建项目 </span> } description={desc1} /> <Step title={ <span style={{ fontSize: 14, }} > 部门初审 </span> } description={desc2} /> <Step title={ <span style={{ fontSize: 14, }} > 财务复核 </span> } /> <Step title={ <span style={{ fontSize: 14, }} > 完成 </span> } /> </Steps> </> )
Example #12
Source File: progress-dot.jsx From virtuoso-design-system with MIT License | 5 votes |
{ Step } = Steps
Example #13
Source File: tools.js From hashcat.launcher with MIT License | 5 votes |
{ Step } = Steps
Example #14
Source File: icon.jsx From virtuoso-design-system with MIT License | 5 votes |
{ Step } = Steps
Example #15
Source File: stepComponent.js From acy-dex-interface with MIT License | 5 votes |
{ Step } = Steps
Example #16
Source File: index.jsx From prometheusPro with MIT License | 5 votes |
{ Step } = Steps
Example #17
Source File: vertical.jsx From virtuoso-design-system with MIT License | 5 votes |
storiesOf('antd/steps', module).add('vertical', () =>
<Steps direction="vertical" current={1}>
<Step title="Finished" description="This is a description." />
<Step title="In Progress" description="This is a description." />
<Step title="Waiting" description="This is a description." />
</Steps>,
{ docs: { page: () => (<><h1 id="enus">en-US</h1>
<p>A simple step bar in the vertical direction.</p></>) } });
Example #18
Source File: index.js From discern with BSD 3-Clause "New" or "Revised" License | 5 votes |
Step = Steps.Step
Example #19
Source File: RegisterSymbols.js From bonded-stablecoin-ui with MIT License | 5 votes |
{ Step } = Steps
Example #20
Source File: TrackEnroll.js From codeclannigeria-frontend with MIT License | 5 votes |
function TrackEnroll({
visible,
getTracksAction,
loading,
error,
userEnrollTrackAction,
errResponse,
data,
onCancel,
}) {
const [current, setCurrent] = useState(0);
const [trackId, setTrackId] = useState(null);
const [mentorId, setMentorId] = useState(null);
const [trackTitle, setTrackTitle] = useState(null);
const [currentPage, setCurrentPage] = useState(1);
// eslint-disable-next-line
const [trackPerPage, setTrackperPage] = useState(3);
const indexOfLastTrack = currentPage * trackPerPage;
const indexOfFirstTrack = indexOfLastTrack - trackPerPage;
const { items } = data;
const paginate = pageNumber => setCurrentPage(pageNumber);
const currentTracks = items
? items.slice(indexOfFirstTrack, indexOfLastTrack)
: null;
const getTrackName = id => {
const track = items.filter(data => data.id === id);
setTrackTitle(track[0].title);
};
function next() {
const newCurrent = current + 1;
setCurrent(newCurrent);
}
function prev() {
const newCurrent = current - 1;
setCurrent(newCurrent);
}
const handleSetTrackId = e => {
setTrackId(e.target.value);
};
const handleSetMentorId = e => {
setMentorId(e.target.value);
};
const handleEnrollTrack = async (trackId, mentorId) => {
try {
await userEnrollTrackAction(trackId, mentorId);
await getTrackName(trackId);
} catch (error) {}
next();
};
useEffect(() => {
getTracksAction();
}, [getTracksAction]);
return (
<TrackEnrollStyled>
<Modal
visible={visible}
onCancel={onCancel}
className="custom-ant-modal"
footer={null}
closable={false}
>
<Steps current={current}>
{steps.map(item => (
<Step key={item.title} title={item.title} />
))}
</Steps>
{current === 0 && items ? (
<React.Fragment>
<Radio.Group onChange={handleSetTrackId} defaultValue={null}>
<div className="tracks-card">
{currentTracks ? (
currentTracks.map((item, idx) => (
<TrackCard
next={next}
data={item}
key={idx}
logo={tempCourseLogo}
/>
))
) : (
<CustomLoader />
)}
</div>
</Radio.Group>
<div style={{ display: 'flex', justifyContent: 'flex-end' }}>
<Pagination
// postPerPage={postPerPage}
total={items.length}
defaultCurrent={currentPage}
// paginate={paginate}
onChange={paginate}
pageSize={trackPerPage}
showSizeChanger={false}
/>
</div>
</React.Fragment>
) : null}
{current === 1 ? <TracksEnrollStages id={trackId} /> : null}
{current === 2 ? (
<React.Fragment>
<SelectMentorStep
trackId={trackId}
handleSetMentorId={handleSetMentorId}
/>
</React.Fragment>
) : null}
{current === 3 ? (
<EnrollmentStatus
status={error ? 'error' : 'success'}
title={trackTitle}
prev={prev}
/>
) : null}
<div className="steps-action">
{current === 0 && (
<Button type="primary" disabled={!trackId} onClick={() => next()}>
Next
</Button>
)}
{current === 1 && (
<React.Fragment>
<Button type="default" onClick={() => prev()}>
Back
</Button>
<Popconfirm
title="Are you sure?"
onConfirm={() => next()}
icon={<QuestionCircleOutlined style={{ color: 'green' }} />}
>
<Button type="primary" className="ml-2">
Next
</Button>
</Popconfirm>
</React.Fragment>
)}
{current === 2 && (
<React.Fragment>
<Button type="default" onClick={() => prev()}>
Back
</Button>
<Popconfirm
title="Are you sure?"
onConfirm={() => handleEnrollTrack(trackId, mentorId)}
icon={<QuestionCircleOutlined style={{ color: 'green' }} />}
disabled={!mentorId}
>
<Button type="primary" disabled={!mentorId} className="ml-2">
Enroll
</Button>
</Popconfirm>
</React.Fragment>
)}
{current === 3 && (
<Button type="primary" onClick={() => onCancel()}>
Done
</Button>
)}
</div>
</Modal>
</TrackEnrollStyled>
);
}
Example #21
Source File: index.js From gobench with Apache License 2.0 | 5 votes |
render() {
return (
<div>
<h5 className="mb-3">
<strong>Basic</strong>
</h5>
<div className="mb-5">
<Steps current={1}>
<Step title="Finished" description="This is a description." />
<Step title="In Progress" description="This is a description." />
<Step title="Waiting" description="This is a description." />
</Steps>
</div>
<h5 className="mb-3">
<strong>With Icons</strong>
</h5>
<div className="mb-5">
<Steps>
<Step status="finish" title="Login" icon={<UserOutlined />} />
<Step status="finish" title="Verification" icon={<SolutionOutlined />} />
<Step status="process" title="Pay" icon={<LoadingOutlined />} />
<Step status="wait" title="Done" icon={<SmileOutlined />} />
</Steps>
</div>
<h5 className="mb-3">
<strong>Centered</strong>
</h5>
<div className="mb-5">
<Steps progressDot current={1}>
<Step title="Finished" description="This is a description." />
<Step title="In Progress" description="This is a description." />
<Step title="Waiting" description="This is a description." />
</Steps>
</div>
<h5 className="mb-3">
<strong>Vertical</strong>
</h5>
<div className="mb-5">
<Steps direction="vertical" current={1}>
<Step title="Finished" description="This is a description." />
<Step title="In Progress" description="This is a description." />
<Step title="Waiting" description="This is a description." />
</Steps>
</div>
</div>
)
}
Example #22
Source File: index.js From camel-store-admin with Apache License 2.0 | 5 votes |
{ Step } = Steps
Example #23
Source File: CreatePage.js From bonded-stablecoin-ui with MIT License | 5 votes |
{ Step } = Steps
Example #24
Source File: AdvancedProfile.js From camel-store-admin with Apache License 2.0 | 5 votes |
{ Step } = Steps
Example #25
Source File: FormDemo2.js From discern with BSD 3-Clause "New" or "Revised" License | 5 votes |
{ Step } = Steps
Example #26
Source File: index.js From QiskitFlow with Apache License 2.0 | 5 votes |
{ Step } = Steps
Example #27
Source File: TableList.js From youdidao-unmanned-shop with MIT License | 5 votes |
{ Step } = Steps
Example #28
Source File: styles.js From bank-client with MIT License | 5 votes |
StyledSteps = styled(Steps)`
&&& {
padding: 20px 20px 30px;
max-width: 1260px;
margin: 0 auto;
flex-direction: row;
.ant-steps-item {
display: flex;
align-items: center;
justify-content: center;
.ant-steps-item-icon {
margin-right: 0;
}
.ant-steps-item-content {
display: none;
}
}
${media.phone`
.ant-steps-item {
&:last-child {
flex: 1;
}
}
`}
${media.tablet`
padding: 20px 50px 30px;
.ant-steps-item {
display: inline-block;
&:last-child {
flex: none;
}
.ant-steps-item-icon {
margin: 0 8px 0 0;
}
.ant-steps-item-content {
display: inline-block;
}
}
`}
}
`
Example #29
Source File: index.js From QiskitFlow with Apache License 2.0 | 5 votes |
export function HomePage({ dispatch, user, loggedIn, loading }) {
useInjectReducer({ key, reducer });
useInjectSaga({ key, saga });
const loginForm = loggedIn ? '' : <Login />;
return (
<div>
<Helmet>
<title>Home</title>
</Helmet>
<Row gutter={[16, 16]}>
<Col span={18}>
<Card title="Greetings!" style={{ margin: '20px 0' }}>
<p>
Welcome to alpha version of QiskitFlow! Platform for tracking,
sharing and running quantum experiments in a clean and
understandable for developers, researchers and students manner.
Thank you for taking time and reviewing our efforts in making
quantum computing more transparent for everybody!
</p>
<p>
If you have any questions or suggestions feel free to drop an
email [email protected] or open{' '}
<a href="https://github.com/IceKhan13/QiskitFlow/issues" target="_blank">
Github issue
</a>
</p>
</Card>
<Divider />
<h2>Public experiments</h2>
<SharedRunsList />
</Col>
<Col span={6}>
<Card title="QiskitFlow info" style={{ margin: '20px 0' }}>
<b>Build</b>: 0.0.10-alpha
<br />
<b>Github</b>:{' '}
<a href="https://github.com/IceKhan13/QiskitFlow" target="_blank">
https://github.com/IceKhan13/QiskitFlow
</a>
<br />
<b>PyPi</b>:{' '}
<a href="https://pypi.org/project/qiskitflow/" target="_black">
https://pypi.org/project/qiskitflow/
</a>
</Card>
{loginForm}
<img
src="https://media.giphy.com/media/rmIGBIsDle8dEPubrG/giphy.gif"
alt="QiskitFlow 3d"
width="100%"
/>
<Card title="Roadmap" style={{ margin: '20px 0' }}>
<Steps direction="vertical" current={1}>
<Step
title="Alpha release"
description="Alpha release for closed testing"
/>
<Step title="Testing" description="Testing is in progress" />
<Step
title="General public release"
description="Release for general public with open registration"
/>
<Step
title="Experiments compiler"
description="Compiler backend for building executable images of executed experiments"
/>
</Steps>
</Card>
</Col>
</Row>
</div>
);
}