File tree 3 files changed +35
-29
lines changed
3 files changed +35
-29
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ import Component from '@glimmer/component';
7
7
import { assert } from ' @ember/debug' ;
8
8
import { htmlSafe } from ' @ember/template' ;
9
9
10
+ import ShwLabel from ' ../label' ;
11
+ import HdsIcon from ' @hashicorp/design-system-components/components/hds/icon/index' ;
12
+
10
13
import type { SafeString } from ' @ember/template' ;
11
14
12
15
interface ShwFrameSignature {
@@ -84,4 +87,35 @@ export default class ShwFrameComponent extends Component<ShwFrameSignature> {
84
87
85
88
return styles .length > 0 ? htmlSafe (styles .join (' ; ' )) : undefined ;
86
89
}
90
+
91
+ <template >
92
+ <div class =" shw-frame" style ={{this .style }} >
93
+ {{#if @ label }}
94
+ <ShwLabel >{{@ label }} </ShwLabel >
95
+ {{/if }}
96
+ <div class =" shw-frame__browser" >
97
+ <div class =" shw-frame__browser-navigation" >
98
+ <a
99
+ class =" shw-frame__open-link"
100
+ href ={{this .src }}
101
+ target =" _blank"
102
+ rel =" noopener noreferrer"
103
+ >
104
+ <HdsIcon @ name =" external-link" @ stretched ={{ true }} />
105
+ <span class =" sr-only" >open the frame in a new window</span >
106
+ </a >
107
+ </div >
108
+ <iframe
109
+ id ={{@ id }}
110
+ class =" shw-frame__browser-viewport"
111
+ src ={{this .src }}
112
+ referrerpolicy =" no-referrer"
113
+ sandbox =" allow-same-origin allow-scripts"
114
+ loading =" lazy"
115
+ title ={{this .title }}
116
+ ...attributes
117
+ ></iframe >
118
+ </div >
119
+ </div >
120
+ </template >
87
121
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import ShwAutoscrollable from '../app/components/shw/autoscrollable/index';
7
7
import ShwDivider from '../app/components/shw/divider/index' ;
8
8
import ShwFlex from '../app/components/shw/flex/index' ;
9
9
import ShwFlexItem from '../app/components/shw/flex/item' ;
10
- import ShwFrame from '../app/components/shw/frame' ;
10
+ import ShwFrame from '../app/components/shw/frame/index ' ;
11
11
import ShwGrid from '../app/components/shw/grid' ;
12
12
import ShwGridItem from '../app/components/shw/grid/item' ;
13
13
import ShwLabel from '../app/components/shw/label/index' ;
You can’t perform that action at this time.
0 commit comments