Michael Shilman 54503208a6 CLI: Fix sb init to use renderer assets instead of frameworks
In 6.5 the `framework` config option was one of `react`, `angular`, etc. and included Webpack settings.

In the 7.0, we’ve updated it so that these are now called `renderers`, and are builder-independent. Now, frameworks contain specific builder information, such as `cra` or `nextjs` (for specific app environments) or `react-webpack5` / `react-vite` (for custom apps).

This fixes the `sb init` CLI command to use renderer-specific templates. I also call out some follow-up work to fix automigrations & telemetry
2022-09-02 15:35:27 +08:00

22 lines
597 B
JavaScript

import { html } from 'lit-html';
import { styleMap } from 'lit-html/directives/style-map.js';
import './button.css';
/**
* Primary UI component for user interaction
*/
export const Button = ({ primary, backgroundColor = null, size, label, onClick }) => {
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
return html`
<button
type="button"
class=${['storybook-button', `storybook-button--${size || 'medium'}`, mode].join(' ')}
style=${styleMap({ backgroundColor })}
@click=${onClick}
>
${label}
</button>
`;
};