-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(front): edit a stack * feat(stack): refactor Co-authored-by: Thomasevano <[email protected]> --------- Co-authored-by: Romain Dreidemy <[email protected]>
- Loading branch information
1 parent
ae40442
commit cdf003c
Showing
5 changed files
with
84 additions
and
55 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
front/src/views/organisms/CreateStackFormModal.organism.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React, { type ReactElement } from 'react' | ||
import { type IStackCreate } from '../../interfaces/Stack.interface' | ||
import StackFormModalOrganism from './StackFormModal.organism' | ||
|
||
const CreateStackFormModalOrganism = ({ toggle, onSubmit }: { | ||
toggle: () => void | ||
onSubmit: (form: IStackCreate) => Promise<void> | ||
}): ReactElement => { | ||
return <StackFormModalOrganism | ||
title='Create a new stack' | ||
buttonText='Create stack +' | ||
stack={undefined} | ||
toggle={toggle} | ||
onSubmit={onSubmit} | ||
/> | ||
} | ||
|
||
export default CreateStackFormModalOrganism |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React, { type ReactElement } from 'react' | ||
import { type IStack, type IStackCreate } from '../../interfaces/Stack.interface' | ||
import StackFormModalOrganism from './StackFormModal.organism' | ||
|
||
const EditStackFormModalOrganism = ({ stack, toggle, onSubmit }: { | ||
stack: IStack | undefined | ||
toggle: () => void | ||
onSubmit: (form: IStackCreate) => Promise<void> | ||
}): ReactElement => { | ||
return <StackFormModalOrganism | ||
title="Edit stack" | ||
buttonText="Edit" | ||
stack={stack} | ||
toggle={toggle} | ||
onSubmit={onSubmit} | ||
/> | ||
} | ||
|
||
export default EditStackFormModalOrganism |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters