-
Notifications
You must be signed in to change notification settings - Fork 777
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Describe theme API and fix theme applying instructions (#7102)
* Describe theme API and fix theme applying instructions * Trim whitespaces
- Loading branch information
1 parent
7984103
commit 160ed62
Showing
4 changed files
with
139 additions
and
40 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
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 |
---|---|---|
@@ -1,14 +1,66 @@ | ||
export type ImageFit = "auto" | "contain" | "cover"; | ||
export type ImageAttachment = "fixed" | "scroll"; | ||
|
||
/** | ||
* A theme configuration interface. | ||
* | ||
* `ITheme` objects are used to apply predefined themes or create custom themes. Refer to the following help topic for more information: | ||
* | ||
* [Themes & Styles](https://surveyjs.io/form-library/documentation/manage-default-themes-and-styles (linkStyle)) | ||
*/ | ||
export interface ITheme { | ||
/** | ||
* A theme name. | ||
*/ | ||
themeName?: string; | ||
/** | ||
* A color palette. | ||
* | ||
* Possible values: | ||
* | ||
* - `"light"` | ||
* - `"dark"` | ||
*/ | ||
colorPalette?: string; | ||
/** | ||
* A Boolean value that specifies whether survey questions are displayed within panels (`false`) or without them (`true`). | ||
*/ | ||
isPanelless?: boolean; | ||
/** | ||
* An image to display as survey background. This property accepts a hyperlink or a data URL. | ||
*/ | ||
backgroundImage?: string; | ||
/** | ||
* A string value that specifies how to resize the [background image](#backgroundImage) to fit it into its container. | ||
* | ||
* Possible values: | ||
* | ||
* - `"auto"` | ||
* - `"contain"` | ||
* - `"cover"` | ||
* | ||
* Refer to the description of the [`background-size`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-size#values) CSS property values on MDN for detailed information on the possible values. | ||
*/ | ||
backgroundImageFit?: ImageFit; | ||
/** | ||
* A string value that specifies whether the [background image](#backgroundImage) is fixed in its position or scrolled along with the survey. | ||
* | ||
* Possible values: | ||
* | ||
* - `"fixed"` | ||
* - `"scroll"` | ||
*/ | ||
backgroundImageAttachment?: ImageAttachment; | ||
/** | ||
* A value from 0 to 1 that specifies how transparent the [background image](#backgroundImage) should be: 0 makes the image completely transparent, and 1 makes it opaque. | ||
*/ | ||
backgroundOpacity?: number; | ||
/** | ||
* An object with survey header settings. | ||
*/ | ||
cover?: {[index: string]: any}; | ||
/** | ||
* An object with CSS variables. | ||
*/ | ||
cssVariables?: { [index: string]: string }; | ||
} |