beta/src/components/MDX/Sandpack/OpenInCodeSandboxButton.tsx (15 lines of code) (raw):

/* * Copyright (c) Facebook, Inc. and its affiliates. */ import * as React from 'react'; import {UnstyledOpenInCodeSandboxButton} from '@codesandbox/sandpack-react'; import {IconNewPage} from '../../Icon/IconNewPage'; export const OpenInCodeSandboxButton = () => { return ( <UnstyledOpenInCodeSandboxButton className="text-sm text-primary dark:text-primary-dark inline-flex items-center hover:text-link duration-100 ease-in transition mx-1 ml-3 md:ml-1" title="Open in CodeSandbox"> <IconNewPage className="inline mb-0.5 ml-1 mr-1 relative top-px" width=".8em" height=".8em" /> <span className="hidden md:block">Fork</span> </UnstyledOpenInCodeSandboxButton> ); };