Commit 6e201742 authored by spc's avatar spc

Merge branch 'dui' of http://gitlab2.dui88.com/zhangyuan/wangjin-front-end into dui111

parent f83895c0
import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
import '@storybook/addon-notes/register';
import 'storybook-readme/register';
\ No newline at end of file
const path = require("path");
// your app's webpack.config.js
const custom = require('./webpack.config.js');
module.exports = { module.exports = {
stories: ['../src/stories/index.tsx'], stories: ['../src/**/*.stories.tsx'],
addons: [ };
{ \ No newline at end of file
"name": "@storybook/preset-create-react-app",
"options": {
"craOverrides": {
"fileLoaderExcludes": [".less"]
}
}
}
],
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
import React from 'react';
import "./testSpan.less";
export const TestSpan = (obj)=>{
return (
<span className="testButton">
<span className = "testButton-inner">
</span>
{obj.label}
</span>
)
}
\ No newline at end of file
import React from 'react';
import { Button } from '@storybook/react/demo';
export default {
component: Button,
title: 'Components/Button',
};
//👇 We create a “template” of how args map to rendering
const Template = (args) => <Button {...args} />;
//👇 Each story then reuses that template
export const Primary = Template.bind({});
Primary.args = {
primary: true,
label: 'Button',
};
import React from 'react';
import { TestSpan } from "../components/testSpan/testSpan";
export default {
component: TestSpan,
title: 'Components/TestSpan',
};
//👇 We create a “template” of how args map to rendering
const Template = (args) => <TestSpan {...args} />;
//👇 Each story then reuses that template
export const Primary = Template.bind({});
Primary.args = {
primary: false,
label: 'TestSpan',
};
export const Default = Template.bind({});
Default.args = {
primary: false,
label: 'TestSpan-Default',
};
\ No newline at end of file
import React from "react";
import { storiesOf } from "@storybook/react";
import { Button } from "@storybook/react/demo";
import "./test"
import "./index.less"
storiesOf("Button", module)
.add("with text", () => <Button>Hello Button</Button>)
.add("with emoji", () => (
<Button>
<span role="img" aria-label="so cool">
</span>
</Button>
));
storiesOf("TestButton", module)
.add("with text", () => <span className="testButton"><span className = "testButton-inner"></span></span>)
\ No newline at end of file
const a = 1;
function add(b:number){
return b+a
}
console.log(add(3))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment