-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add forms configs to PageConstructorProvider (#858)
* feat: add forms configs to PageConstructorProvider * fixup! feat: add forms configs to PageConstructorProvider
- Loading branch information
1 parent
884af20
commit 2736947
Showing
4 changed files
with
44 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
|
||
import {YandexFormProps} from '../../models/constructor-items/common'; | ||
import {HubspotFormProps} from '../../models/constructor-items/sub-blocks'; | ||
|
||
export const DEFAULT_FORMS_CONTEXT_VALUE: FormsContextProps = {}; | ||
|
||
export interface FormsContextProps { | ||
yandex?: YandexFormsContextProps; | ||
hubspot?: HubspotFormsContextProps; | ||
} | ||
|
||
export interface YandexFormsContextProps | ||
extends Partial<Pick<YandexFormProps, 'customFormOrigin'>> {} | ||
|
||
export interface HubspotFormsContextProps | ||
extends Partial<Pick<HubspotFormProps, 'createDOMElement'>> {} | ||
|
||
export const FormsContext = React.createContext<FormsContextProps>(DEFAULT_FORMS_CONTEXT_VALUE); |
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 @@ | ||
export * from './FormsContext'; |