This repository was archived by the owner on Jun 13, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ const propTypes = {
1313export default function Code ( props ) {
1414return (
1515< code >
16- < p > { '<InputNumeric' } </ p >
16+ < p className = "component-name" > { '<InputNumeric' } </ p >
1717{
1818Object . keys ( props . options ) . map ( ( key ) => {
1919const value = props . options [ key ] ;
@@ -26,7 +26,7 @@ export default function Code(props) {
2626return < p key = { key } > { key } ={{ value } }</ p > ;
2727} )
2828}
29- < p > { '/>' } </ p >
29+ < p className = "component-name" > { '/>' } </ p >
3030</ code >
3131) ;
3232}
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { storiesOf } from '@storybook/react' ;
33import { withState } from '@dump247/storybook-state' ;
4+
45import Code from './Code' ;
56import InputNumeric from '../lib/InputNumeric' ;
7+ import './style.css' ;
68
79
810storiesOf ( 'InputNumeric' , module )
@@ -13,6 +15,7 @@ storiesOf('InputNumeric', module)
1315value = { store . state . value }
1416onChange = { value => store . set ( { value } ) }
1517/>
18+ < br />
1619< Code
1720options = { {
1821value : 'this.state.value' ,
@@ -30,6 +33,7 @@ storiesOf('InputNumeric', module)
3033step = { 0.2 }
3134onChange = { value => store . set ( { value } ) }
3235/>
36+ < br />
3337< Code
3438options = { {
3539value : 'this.state.value' ,
@@ -50,6 +54,7 @@ storiesOf('InputNumeric', module)
5054step = { 0.01 }
5155onChange = { value => store . set ( { value } ) }
5256/>
57+ < br />
5358< Code
5459options = { {
5560value : 'this.state.value' ,
Original file line number Diff line number Diff line change 1+ p {
2+ margin : 0 ;
3+ }
4+
5+ code {
6+ display : inline-block;
7+ margin : 40px 0 0 0 ;
8+ padding : 5px 10px ;
9+ background : # F6F6F6 ;
10+ border-radius : 5px ;
11+
12+ font-size : 14px ;
13+ line-height : 1.6 ;
14+ }
15+
16+ code .component-name {
17+ font-weight : bold;
18+ }
You can’t perform that action at this time.
0 commit comments