@@ -5,6 +5,8 @@ import { EditorOptions, openAngularEditor, openHtmlEditor, openReactEditor, open
55import { Mode , UsageTarget } from './playground.types' ;
66import useThemeContext from '@theme/hooks/useThemeContext' ;
77
8+ import Tippy from '@tippyjs/react' ;
9+ import 'tippy.js/dist/tippy.css' ;
810
911const ControlButton = ( { isSelected, handleClick, title, label } ) => {
1012 return (
@@ -156,7 +158,8 @@ export default function Playground({
156158 />
157159 </ div >
158160 < div className = "playground__control-group playground__control-group--end" >
159- < button
161+ < Tippy theme = "playground" arrow = { false } placement = "bottom" content = { codeExpanded ? 'Hide source code' : 'Show full source' } >
162+ < button
160163 className = "playground__icon-button playground__icon-button--primary"
161164 aria-label = { codeExpanded ? 'Hide source code' : 'Show full source' }
162165 onClick = { ( ) => setCodeExpanded ( ! codeExpanded ) }
@@ -173,7 +176,9 @@ export default function Playground({
173176 < path d = "M11 9L15 5L11 1" stroke = "current" strokeLinecap = "round" strokeLinejoin = "round" />
174177 </ svg >
175178 </ button >
176- < a
179+ </ Tippy >
180+ < Tippy theme = "playground" arrow = { false } placement = "bottom" content = "Report an issue" >
181+ < a
177182 className = "playground__icon-button"
178183 href = "https://github.com/ionic-team/ionic-docs/issues/new/choose"
179184 aria-label = "Report an issue"
@@ -187,7 +192,9 @@ export default function Playground({
187192 />
188193 </ svg >
189194 </ a >
190- < button className = "playground__icon-button playground__icon-button--primary" onClick = { copySourceCode } >
195+ </ Tippy >
196+ < Tippy theme = "playground" arrow = { false } placement = "bottom" content = "Copy source code" >
197+ < button className = "playground__icon-button playground__icon-button--primary" onClick = { copySourceCode } >
191198 < svg
192199 aria-hidden = "true"
193200 xmlns = "http://www.w3.org/2000/svg"
@@ -203,7 +210,9 @@ export default function Playground({
203210 < rect x = "3" y = "3" width = "8" height = "8" rx = "1.5" stroke = "current" />
204211 </ svg >
205212 </ button >
206- < button className = "playground__icon-button playground__icon-button--primary" onClick = { openEditor } >
213+ </ Tippy >
214+ < Tippy theme = "playground" arrow = { false } placement = "bottom" content = "Open in StackBlitz" >
215+ < button className = "playground__icon-button playground__icon-button--primary" onClick = { openEditor } >
207216 < svg
208217 aria-hidden = "true"
209218 width = "12"
@@ -221,6 +230,7 @@ export default function Playground({
221230 />
222231 </ svg >
223232 </ button >
233+ </ Tippy >
224234 </ div >
225235 </ div >
226236 < div className = "playground__preview" >
0 commit comments