mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
1707a2555b
Refactor "Copy Project" modal GitOrigin-RevId: b6039d57c29c04a7cd20dd4a2ab5216d485c05ed
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
import React from 'react'
|
|
|
|
import CloneProjectModalContent from '../js/features/clone-project-modal/components/clone-project-modal-content'
|
|
|
|
export const Basic = args => {
|
|
return <CloneProjectModalContent {...args} />
|
|
}
|
|
|
|
export const Invalid = args => {
|
|
return (
|
|
<CloneProjectModalContent {...args} clonedProjectName="" valid={false} />
|
|
)
|
|
}
|
|
|
|
export const Inflight = args => {
|
|
return <CloneProjectModalContent {...args} inFlight />
|
|
}
|
|
|
|
export const GenericError = args => {
|
|
return <CloneProjectModalContent {...args} error />
|
|
}
|
|
|
|
export const SpecificError = args => {
|
|
return (
|
|
<CloneProjectModalContent {...args} error="There was a specific error" />
|
|
)
|
|
}
|
|
|
|
export default {
|
|
title: 'Clone Project Modal / Content',
|
|
component: CloneProjectModalContent,
|
|
args: {
|
|
animation: false,
|
|
projectId: 'original-project',
|
|
clonedProjectName: 'Project Title',
|
|
show: true,
|
|
error: false,
|
|
inFlight: false,
|
|
valid: true
|
|
},
|
|
argTypes: {
|
|
cancel: { action: 'cancel' },
|
|
handleSubmit: { action: 'submit' },
|
|
setClonedProjectName: { action: 'set project name' }
|
|
}
|
|
}
|