import * as React from 'react'; import { SFC } from 'react'; import { useConfig } from 'docz'; import lighten from 'polished/lib/color/lighten'; import Code from 'react-feather/dist/icons/code'; import styled, { css } from 'styled-components'; import Popover from 'components/popover'; import { get as themeGet } from './theme'; import { CodeSandboxLogo } from './CodeSandboxLogo'; import { ActionButton, ClipboardAction } from '../Editor/elements'; interface ActionsProps { theme: any; withRadius: boolean; } const borderColor = themeGet('colors.border'); const getActionsBg = (p: ActionsProps) => lighten(0.13, borderColor(p)); const Actions = styled.div` display: flex; justify-content: center; padding: 0 5px; background: ${getActionsBg}; `; const actionStyle = css` padding: 3px 10px; `; const Action = styled(ActionButton)>` ${actionStyle}; `; const Clipboard = styled(ClipboardAction)` ${actionStyle}; `; export interface ActionsBarProps { code: string; showEditor: boolean; fullscreen: boolean; codesandboxUrl: string | null; onClickRefresh: () => void; onClickFullscreen: () => void; onClickEditor: () => void; } export const ActionsBar: SFC = ({ showEditor, code, onClickEditor }) => { const config = useConfig(); return ( ); };