@@ -4,49 +4,6 @@ import { Button } from '@ui5/webcomponents-react/lib/Button';
44import { ButtonDesign } from '@ui5/webcomponents-react/lib/ButtonDesign' ;
55import React from 'react' ;
66
7- const customStyle1 = {
8- color : 'red'
9- } ;
10-
11- const customStyle2 = {
12- width : '15rem'
13- } ;
14-
15- class DemoButton extends React . Component {
16- state = {
17- showCS1 : false ,
18- showCS2 : false
19- } ;
20-
21- render ( ) {
22- const { showCS1, showCS2 } = this . state ;
23-
24- const innerStyles = {
25- ...( showCS1 ? customStyle1 : { } ) ,
26- ...( showCS2 ? customStyle2 : { } )
27- } ;
28-
29- return (
30- < div >
31- < div >
32- < Button onClick = { ( ) => this . setState ( { showCS1 : ! showCS1 } ) } > Toggle Custom Style 1</ Button >
33- < Button onClick = { ( ) => this . setState ( { showCS2 : ! showCS2 } ) } > Toggle Custom Style 2</ Button >
34- </ div >
35- < Button
36- design = { select ( 'design' , ButtonDesign , ButtonDesign . Default ) }
37- disabled = { boolean ( 'disabled' , false ) }
38- icon = { 'add' }
39- iconEnd = { boolean ( 'iconEnd' , false ) }
40- onClick = { action ( 'Button clicked' ) }
41- innerStyles = { innerStyles }
42- >
43- Some Content
44- </ Button >
45- </ div >
46- ) ;
47- }
48- }
49-
507export default {
518 title : 'UI5 Web Components / Button' ,
529 component : Button
@@ -67,9 +24,3 @@ export const generatedDefaultStory = () => (
6724generatedDefaultStory . story = {
6825 name : 'Generated default story'
6926} ;
70-
71- export const withCustomStyles = ( ) => < DemoButton /> ;
72-
73- withCustomStyles . story = {
74- name : 'With custom Styles'
75- } ;
0 commit comments