Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.add('dark unsupported', () => {
const theme = ensure(themes.dark);
return (
{`
// A Hello World! program in C#.
using System;
namespace HelloWorld
{
class Hello
{
static void Main()
{
Console.WriteLine("Hello World!");
// Keep the console window open in debug mode.
Console.WriteLine("Press any key to exit.");
export const DocsContainer: React.FunctionComponent = ({
context,
content: MDXContent,
}) => {
const options = (context && context.parameters && context.parameters.options) || {};
const theme = ensureTheme(options.theme);
const { getPropDefs = null, components: userComponents = null } = options.docs || {};
const components = { ...defaultComponents, ...userComponents };
return (
);
export const DocsContainer: React.FunctionComponent = ({
context,
content: MDXContent,
}) => {
const parameters = (context && context.parameters) || {};
const options = parameters.options || {};
const theme = ensureTheme(options.theme);
const { components: userComponents = null } = options.docs || {};
const components = { ...defaultComponents, ...userComponents };
return (
);
{({ state, api }) => {
const panelCount = Object.keys(api.getPanels()).length;
const story = state.storiesHash[state.storyId];
return (
);
}}
import React from 'react';
import { ThemeProvider } from 'emotion-theming';
import { ensure, themes } from '@storybook/theming';
import { global } from '@storybook/design-system';
const theme = ensure(themes.light);
const { GlobalStyle } = global;
export const Global = ({ children }) => (
{children}
);
export const Info = ({ context }) => {
const {
parameters: { component, options },
} = context;
const themeVars = options && options.theme;
const propDefinitions = component && component.propDefinitions;
const theme = ensureTheme(themeVars);
return (
{propDefinitions ? : <div>No info</div>}
);
};