@@ -68,17 +68,18 @@ const Done = css`
6868 background-color : # 33C3F0 ;
6969 }
7070`
71- const NavButton = styled ( 'button' ) `
72- background: #33C3F0;
73- border-color: silver;
74- color: white;
75-
76- &:disabled {
77- background: silver;
78- border- color: gray;
79- color: gray;
71+
72+ const NavButton = styled ( 'button' ) ( ( props ) => ( {
73+ borderRadius : props . borderRadius ? props . borderRadius + 'px' : '10px' ,
74+ background : props . background ? props . background : '#33C3F0' ,
75+ color : props . color ? props . color : 'white' ,
76+ ' &:disabled' : {
77+ background : props . disabledBackground ? props . disabledBackground : 'blue' ,
78+ color : props . disabledColor ? props . disabledColor : ' gray' ,
79+ cursor : props . disabledCursor ? props . disabledCursor : 'no-drop'
8080 }
81- `
81+ } ) )
82+
8283
8384const getStep = ( newIndex , length ) => {
8485 if ( newIndex <= length && newIndex > 0 ) {
@@ -131,6 +132,21 @@ export default function MultiStep(props) {
131132 const showTitles = typeof props . showTitles === 'undefined' ? false : true
132133 const showNav = typeof props . showButtonNav === 'undefined' ? false : true
133134
135+ const extStyles =
136+ {
137+ nav : {
138+ background : '#3eC3Fe' ,
139+ border : 'red' ,
140+ color : 'red' ,
141+ disabled : {
142+ background : 'white' ,
143+ border : 'silver' ,
144+ color : 'gray' ,
145+ cursor : 'no-drop'
146+ }
147+ }
148+ }
149+
134150 const [ activeStep , _ ] = useState ( getStep ( props . activeStep , props . steps . length ) ) ;
135151 const [ stylesState , setStyles ] = useState ( getTopNavStyles ( activeStep , props . steps . length ) )
136152 const [ compState , setComp ] = useState ( activeStep )
@@ -184,7 +200,7 @@ export default function MultiStep(props) {
184200 < >
185201 {
186202 buttonsState . showPrevious ?
187- < NavButton onClick = { previous } > Prev</ NavButton > :
203+ < NavButton color = { extStyles . nav . color } onClick = { previous } > Prev</ NavButton > :
188204 < NavButton disabled > Prev</ NavButton >
189205 }
190206 {
0 commit comments