Even simpler
This commit is contained in:
parent
41c4e1b756
commit
d85d5e83dd
@ -23,10 +23,10 @@ widget:
|
|||||||
```yaml
|
```yaml
|
||||||
widget:
|
widget:
|
||||||
type: iframe
|
type: iframe
|
||||||
name: myIframe # string - required - Also helps if you would like to target the iframe with a button
|
name: myIframe
|
||||||
src: "http://example.com" # string - required - URL of the content to load within the iFrame
|
src: "http://example.com"
|
||||||
classes: "h-60 sm:h-60 md:h-60 lg:h-60 xl:h-60 2xl:h-72 w-full rounded" # string - optional - Apply any tailwind height, rounding or width classes you would like
|
classes: "h-60 sm:h-60 md:h-60 lg:h-60 xl:h-60 2xl:h-72" # optional, use tailwind height classes, see https://tailwindcss.com/docs/height
|
||||||
referrerPolicy: "same-origin" # string - optional - no default
|
referrerPolicy: "same-origin" # optional, no default
|
||||||
allowPolicy: "autoplay fullscreen gamepad" # optional, no default
|
allowPolicy: "autoplay fullscreen gamepad" # optional, no default
|
||||||
allowFullscreen: false # optional, default: true
|
allowFullscreen: false # optional, default: true
|
||||||
loadingStrategy: "eager" # optional, default: "eager"
|
loadingStrategy: "eager" # optional, default: "eager"
|
||||||
|
|||||||
@ -19,7 +19,7 @@ export default function Component({ service }) {
|
|||||||
|
|
||||||
const scrollingDisableStyle = widget?.allowScrolling === "no" ? { pointerEvents: "none", overflow: "hidden" } : {};
|
const scrollingDisableStyle = widget?.allowScrolling === "no" ? { pointerEvents: "none", overflow: "hidden" } : {};
|
||||||
|
|
||||||
const classes = widget?.classes || "h-60 sm:h-60 md:h-60 lg:h-60 xl:h-60 2xl:h-72 w-full rounded";
|
const classes = widget?.classes || "h-60 sm:h-60 md:h-60 lg:h-60 xl:h-60 2xl:h-72";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
@ -43,7 +43,7 @@ export default function Component({ service }) {
|
|||||||
style={{
|
style={{
|
||||||
scrollingDisableStyle,
|
scrollingDisableStyle,
|
||||||
}}
|
}}
|
||||||
className={classes}
|
className={`rounded w-full ${classes}`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
|
|||||||
@ -80,13 +80,5 @@ module.exports = {
|
|||||||
pattern: /h-([0-96])/,
|
pattern: /h-([0-96])/,
|
||||||
variants: ["sm", "md", "lg", "xl", "2xl"],
|
variants: ["sm", "md", "lg", "xl", "2xl"],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
pattern: /w-([0-96])/,
|
|
||||||
variants: ["sm", "md", "lg", "xl", "2xl"],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
pattern: /rounded-(sm|md|lg|xl|2xl|3xl|full)/,
|
|
||||||
variants: ["sm", "md", "lg", "xl", "2xl"],
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user