1- import { withKnobs , text , select , number , boolean } from '@storybook/addon-knobs' ;
1+ import { withKnobs , text , number , boolean } from '@storybook/addon-knobs' ;
22import { storiesOf } from '@storybook/web-components' ;
33import { html } from 'lit-html' ;
44import { fontA02 } from './lcd1602-font-a02' ;
@@ -15,7 +15,8 @@ storiesOf('LCD1602', module)
1515 ( ) => html `
1616 < wokwi-lcd1602
1717 .characters ="${ encode ( text ( 'value' , helloWorld ) ) } "
18- cursor =${ select ( 'cursor' , [ 'off' , 'blink' , 'underline' ] , 'off' ) }
18+ .cursor =${ boolean ( 'cursor' , false ) }
19+ .blink =${ boolean ( 'blink' , false ) }
1920 cursorX=${ number ( 'cursorX' , 0 , { min : 0 , max : 15 } ) }
2021 cursorY=${ number ( 'cursorY' , 0 , { min : 0 , max : 1 } ) }
2122 .backlight=${ boolean ( 'backlight' , true ) }
@@ -28,8 +29,8 @@ storiesOf('LCD1602', module)
2829 < wokwi-lcd1602
2930 color ="white "
3031 background ="blue "
32+ blink ="true "
3133 .characters ="${ encode ( helloWorld ) } "
32- cursor ="blink "
3334 > </ wokwi-lcd1602 >
3435 `
3536 )
@@ -38,18 +39,18 @@ storiesOf('LCD1602', module)
3839 ( ) => html `
3940 < wokwi-lcd1602
4041 .characters ="${ encode ( helloWorld ) } "
41- cursor =" blink "
42+ blink =" true "
4243 cursorX ="7 "
4344 cursorY ="1 "
4445 > </ wokwi-lcd1602 >
4546 `
4647 )
4748 . add (
48- 'Underline cursor ' ,
49+ 'Cursor ' ,
4950 ( ) => html `
5051 < wokwi-lcd1602
5152 .characters ="${ encode ( helloWorld ) } "
52- cursor ="underline "
53+ cursor ="true "
5354 cursorX ="7 "
5455 cursorY ="1 "
5556 > </ wokwi-lcd1602 >
@@ -73,7 +74,8 @@ storiesOf('LCD1602', module)
7374 < wokwi-lcd1602
7475 .characters ="${ encode ( text ( 'value' , symbols ) ) } "
7576 .font =${ fontA02 }
76- cursor =${ select ( 'cursor' , [ 'off' , 'blink' , 'underline' ] , 'off' ) }
77+ .cursor =${ boolean ( 'cursor' , false ) }
78+ .blink=${ boolean ( 'blink' , false ) }
7779 cursorX=${ number ( 'cursorX' , 0 , { min : 0 , max : 15 } ) }
7880 cursorY=${ number ( 'cursorY' , 0 , { min : 0 , max : 1 } ) }
7981 > </ wokwi-lcd1602 >
0 commit comments