-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
task/WP-673: Interactive Modal Redesign (#1456)
* interactive session modal context * use shared state * use shared context for interactive session modal * update existing modal context upon interactive session ready * new design * change launch button wording * linting * remove default message for interactive session * change resubmit to relaunch for interactive apps * linting * linting * formatting
- Loading branch information
1 parent
453bab5
commit e409cbe
Showing
13 changed files
with
225 additions
and
138 deletions.
There are no files selected for viewing
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
20 changes: 20 additions & 0 deletions
20
client/modules/_hooks/src/workspace/useInteractiveModalContext.ts
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,20 @@ | ||
import React, { createContext, useContext } from 'react'; | ||
|
||
type TInteractiveModalDetails = { | ||
show: boolean; | ||
interactiveSessionLink?: string; | ||
message?: string; | ||
openedBySubmit?: boolean; | ||
}; | ||
|
||
export type TInteractiveModalContext = [ | ||
TInteractiveModalDetails, | ||
React.Dispatch<React.SetStateAction<TInteractiveModalDetails>> | ||
]; | ||
|
||
export const InteractiveModalContext = | ||
createContext<TInteractiveModalContext | null>(null); | ||
|
||
export const useInteractiveModalContext = () => { | ||
return useContext(InteractiveModalContext); | ||
}; |
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
99 changes: 70 additions & 29 deletions
99
client/modules/workspace/src/InteractiveSessionModal/InteractiveSessionModal.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
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
Oops, something went wrong.