Replies: 4 comments 2 replies
-
Hi, our export default function BrowserWindow({
children,
minHeight,
url = 'http://localhost:3000',
}: Props): JSX.Element {
return (
<div className={styles.browserWindow} style={{minHeight}}>
<div className={styles.browserWindowHeader}>
<div className={styles.buttons}>
<span className={styles.dot} style={{background: '#f25f58'}} />
<span className={styles.dot} style={{background: '#fbbe3c'}} />
<span className={styles.dot} style={{background: '#58cb42'}} />
</div>
<div className={styles.browserWindowAddressBar}>{url}</div>
<div className={styles.browserWindowMenuIcon}>
<div>
<span className={styles.bar} />
<span className={styles.bar} />
<span className={styles.bar} />
</div>
</div>
</div>
<div className={styles.browserWindowBody}>{children}</div>
</div>
);
} It's exactly what you are asking for :) |
Beta Was this translation helpful? Give feedback.
-
Ah, I didn't try it lol, but working great, thanks! |
Beta Was this translation helpful? Give feedback.
-
Could be worth opening a Canny feature request. That's a bit out of the scope of Docusaurus IMHO but would be convenient. We can eventually extract it to a separate package? And maybe see if there are other useful opinionated doc components to expose as well? That looks like a quite similar use-case to tabs: Docusaurus can work without, but it remains a great useful addition. Not sure what's the best option |
Beta Was this translation helpful? Give feedback.
-
I quite like the original proposal since it makes it very easy to have different browser windows with different urls on one page without having to use the JSX syntax. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to make the
<BrowserWindow>
component part of Docusarus out-the-box and also have it configurable such as changing the URL shown in the address bar?I was planning to use it on of our docs, but instead had to opt for an image as I needed the URL to be something other than
http://localhost:3000
.Something like this, if possible.
Beta Was this translation helpful? Give feedback.
All reactions