mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #15135 from grafana/tooling/stortybook-from-root
Add storybook script to run it from root dir
This commit is contained in:
commit
bcae94f8ca
@ -118,7 +118,8 @@
|
||||
"typecheck": "tsc --noEmit",
|
||||
"jest": "jest --notify --watch",
|
||||
"api-tests": "jest --notify --watch --config=tests/api/jest.js",
|
||||
"precommit": "grunt precommit"
|
||||
"precommit": "grunt precommit",
|
||||
"storybook": "cd packages/grafana-ui && yarn storybook"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import { storiesOf } from '@storybook/react';
|
||||
import { withKnobs } from '@storybook/addon-knobs';
|
||||
|
||||
import SpectrumPalette from './SpectrumPalette';
|
||||
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
||||
import { UseState } from '../../utils/storybook/UseState';
|
||||
@ -11,8 +10,9 @@ const SpectrumPaletteStories = storiesOf('UI/ColorPicker/Palettes/SpectrumPalett
|
||||
|
||||
SpectrumPaletteStories.addDecorator(withCenteredStory).addDecorator(withKnobs);
|
||||
|
||||
SpectrumPaletteStories.add('Named colors swatch - support for named colors', () => {
|
||||
SpectrumPaletteStories.add('default', () => {
|
||||
const selectedTheme = getThemeKnob();
|
||||
|
||||
return (
|
||||
<UseState initialState="red">
|
||||
{(selectedColor, updateSelectedColor) => {
|
||||
|
Loading…
Reference in New Issue
Block a user