Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs-src/tutorials/03-styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ We use [polished](https://github.com/styled-components/polished) to calculate li

| Variable | Purpose | Default
|-----------------------------|--------------------------------------------------------------------|--------
| arrowSize | Sets the scale of the arrow for the tooltip. | 2.1
| overlayOpacity | Sets the opacity of the modal overlay. | 0.5
| shepherdElementBorderRadius | Sets the border-radius of the shepherd-element. | 5px
| shepherdElementMaxHeight | Maximum height of the element | 100%
| shepherdElementMaxWidth | Maximum width of the element | 100%
Expand Down
4 changes: 2 additions & 2 deletions src/js/components/shepherd-modal/styles.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function modalStyles(classPrefix) {
export default function modalStyles(classPrefix, variables) {
return {
'modal-overlay-container': {
'-ms-filter': 'progid:dximagetransform.microsoft.gradient.alpha(Opacity=50)',
Expand All @@ -14,7 +14,7 @@ export default function modalStyles(classPrefix) {
zIndex: 9997,
[`.${classPrefix}shepherd-modal-is-visible &`]: {
height: '100vh',
opacity: '0.5',
opacity: variables.overlayOpacity,
transition: 'all 0.3s ease-out, height 0s 0s, opacity 0.3s 0s'
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/js/styles/generateStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function generateStyles(options) {
...elementStyles(),
...footerStyles(classPrefix, variables),
...headerStyles(classPrefix, variables),
...modalStyles(classPrefix),
...modalStyles(classPrefix, variables),
...textStyles(variables)
};

Expand Down
1 change: 1 addition & 0 deletions src/js/styles/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { darken, desaturate, lighten, readableColor, transparentize } from 'poli

const styles = {
arrowSize: 2.1,
overlayOpacity: 0.5,
shepherdButtonBorderRadius: '3px',
shepherdElementBorderRadius: '5px',
shepherdElementMaxHeight: '100%',
Expand Down