From 388905f9a0bc9528d355f8f4b0bcfd76e98f35ee Mon Sep 17 00:00:00 2001 From: Dan Lebo Date: Tue, 14 Jun 2022 15:26:54 -0700 Subject: [PATCH] Refresh sandbox iconography (#4746) * Refresh sandbox iconography * Remove extra margins --- beta/src/components/Icon/IconDownload.tsx | 30 +++++++++++++++++++ beta/src/components/Icon/IconNewPage.tsx | 13 +++++--- beta/src/components/Icon/IconRestart.tsx | 13 ++++---- .../MDX/Sandpack/DownloadButton.tsx | 8 ++--- .../MDX/Sandpack/OpenInCodeSandboxButton.tsx | 8 ++--- .../components/MDX/Sandpack/ResetButton.tsx | 2 +- 6 files changed, 53 insertions(+), 21 deletions(-) create mode 100644 beta/src/components/Icon/IconDownload.tsx diff --git a/beta/src/components/Icon/IconDownload.tsx b/beta/src/components/Icon/IconDownload.tsx new file mode 100644 index 00000000..fde28c7f --- /dev/null +++ b/beta/src/components/Icon/IconDownload.tsx @@ -0,0 +1,30 @@ +/* + * Copyright (c) Facebook, Inc. and its affiliates. + */ + +import * as React from 'react'; + +export const IconDownload = React.memo( + function IconArrowSmall({className}) { + return ( + + + + + ); + } +); + +IconDownload.displayName = 'IconDownload'; diff --git a/beta/src/components/Icon/IconNewPage.tsx b/beta/src/components/Icon/IconNewPage.tsx index d13b5069..22888b60 100644 --- a/beta/src/components/Icon/IconNewPage.tsx +++ b/beta/src/components/Icon/IconNewPage.tsx @@ -8,13 +8,18 @@ export const IconNewPage = React.memo( function IconNewPage(props) { return ( + diff --git a/beta/src/components/Icon/IconRestart.tsx b/beta/src/components/Icon/IconRestart.tsx index 2e52fe6c..021a40bb 100644 --- a/beta/src/components/Icon/IconRestart.tsx +++ b/beta/src/components/Icon/IconRestart.tsx @@ -8,13 +8,14 @@ export const IconRestart = React.memo( function IconRestart({className}) { return ( + width="1em" + height="1em" + viewBox="0 0 24 24" + fill="none" + xmlns="http://www.w3.org/2000/svg" + className={className}> diff --git a/beta/src/components/MDX/Sandpack/DownloadButton.tsx b/beta/src/components/MDX/Sandpack/DownloadButton.tsx index 137bcee1..19434bce 100644 --- a/beta/src/components/MDX/Sandpack/DownloadButton.tsx +++ b/beta/src/components/MDX/Sandpack/DownloadButton.tsx @@ -4,7 +4,7 @@ import * as React from 'react'; import {useSandpack} from '@codesandbox/sandpack-react'; -import {IconArrowSmall} from '../../Icon/IconArrowSmall'; +import {IconDownload} from '../../Icon/IconDownload'; export interface DownloadButtonProps {} let supportsImportMap: boolean | void; @@ -92,11 +92,7 @@ ${css} onClick={downloadHTML} title="Download Sandbox" type="button"> - {' '} - Download + Download ); }; diff --git a/beta/src/components/MDX/Sandpack/OpenInCodeSandboxButton.tsx b/beta/src/components/MDX/Sandpack/OpenInCodeSandboxButton.tsx index 2a06123a..3db3843d 100644 --- a/beta/src/components/MDX/Sandpack/OpenInCodeSandboxButton.tsx +++ b/beta/src/components/MDX/Sandpack/OpenInCodeSandboxButton.tsx @@ -9,12 +9,12 @@ import {IconNewPage} from '../../Icon/IconNewPage'; export const OpenInCodeSandboxButton = () => { return ( Fork diff --git a/beta/src/components/MDX/Sandpack/ResetButton.tsx b/beta/src/components/MDX/Sandpack/ResetButton.tsx index ba0124b7..db7c5156 100644 --- a/beta/src/components/MDX/Sandpack/ResetButton.tsx +++ b/beta/src/components/MDX/Sandpack/ResetButton.tsx @@ -15,7 +15,7 @@ export const ResetButton: React.FC = ({onReset}) => { onClick={onReset} title="Reset Sandbox" type="button"> - Reset + Reset ); };