Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const Logo = () => {
const config = useConfig();
return (
<a href="{config.website}">
</a>
<a href="{config.repository}">Contribute</a>
<a href="{`${config.website}/about`}">Contact</a>
export const Logo = () => {
const config = useConfig()
return (
<span>Grafana Tanka</span>
<span>{config.description}</span>
)
export const Editor: React.SFC = ({
mode,
children,
actions,
onChange,
className,
editorClassName,
language: defaultLanguage,
...props
}) => {
const config = useConfig()
const initialCode = useMemo(() => getChildren(children), [children])
const [code, setCode] = useState(initialCode)
const language = defaultLanguage || getLanguage(children)
const options = {
...props,
tabSize: 2,
mode: language || mode,
lineNumbers: true,
lineWrapping: true,
autoCloseTags: true,
theme: 'docz-light',
}
const onEditorDidMount = (editor: any) => {
if (editor) removeLastLine(editor)
}
export const Layout = props => {
const config = useConfig()
return (
div': { flex: '1 1 auto' } })}>
{props.children}
)
}
export const Header = () => {
const config = useConfig();
const { edit = true, ...doc } = useCurrentDoc();
return (
<div>
<div>
{config.repository && (
<a rel="noopener noreferrer" href="{config.repository}">
</a></div></div>
const Theme: React.SFC = ({ children }) => {
const config = useConfig()
return (
<main>
{children}
</main>
)
}
const Theme = ({ children }) => {
const config = useConfig()
return (
{children}
)
}
export const Header = () => {
const config = useConfig();
return (
<div>
<div>
<a rel="noopener noreferrer" href="{config.repository}">
</a>
</div></div>
export const Logo = () => {
const config = useConfig();
return (
<div>
<img alt="{config.title}" src="{logo}">
<div>
{config.description}
</div>
</div>
);
};
export const ActionsBar: SFC = ({
showEditor,
code,
fullscreen,
codesandboxUrl,
onClickRefresh,
onClickFullscreen,
onClickEditor,
}) => {
const config = useConfig()
const hasSandbox = Boolean(config.codeSandbox)
return (
{hasSandbox && (