@@ -7,7 +7,51 @@ import * as actions from './../../features/business/businessSlice';
77import * as uiactions from './../../features/ui/uiSlice' ;
88
99// Import MUI components.
10+ import { styled } from '@mui/system' ;
1011import { Box , Button } from '@mui/material' ;
12+ import ButtonUnstyled , { buttonUnstyledClasses } from '@mui/base/ButtonUnstyled' ;
13+
14+ const blue = {
15+ 500 : '#51819b' ,
16+ 600 : '#51819b' ,
17+ 700 : '#7ebdde' ,
18+ } ;
19+
20+ const white = {
21+ 500 : '#f0f6fa' ,
22+ }
23+
24+ const CustomButton = styled ( ButtonUnstyled ) `
25+ font-family: IBM Plex Sans, sans-serif;
26+ font-weight: bold;
27+ font-size: 0.875rem;
28+ background-color: ${ blue [ 500 ] } ;
29+ padding: 10px 0px;
30+ border-radius: 3px;
31+ color: ${ white [ 500 ] } ;
32+ transition: all 150ms ease;
33+ cursor: pointer;
34+ border: none;
35+ width: 8vw;
36+
37+ &:hover {
38+ background-color: ${ blue [ 600 ] } ;
39+ }
40+
41+ &.${ buttonUnstyledClasses . active } {
42+ background-color: ${ blue [ 700 ] } ;
43+ }
44+
45+ &.${ buttonUnstyledClasses . focusVisible } {
46+ box-shadow: 0 4px 20px 0 rgba(61, 71, 82, 0.1), 0 0 0 5px rgba(0, 127, 255, 0.5);
47+ outline: none;
48+ }
49+
50+ &.${ buttonUnstyledClasses . disabled } {
51+ opacity: 0.5;
52+ cursor: not-allowed;
53+ }
54+ ` ;
1155
1256const mapStateToProps = ( store ) => {
1357 return {
@@ -71,13 +115,13 @@ const mapDispatchToProps = (dispatch) => ({
71115 * value: The value of the button used to update the Redux store.
72116 */
73117const pages = [
74- { name : 'HTTP2 ' , route : '/' , value : 'rest' } ,
75- { name : 'GRAPHQL ' , route : '/graphql' , value : 'graphQL' } ,
76- { name : 'GRPC ' , route : '/grpc' , value : 'grpc' } ,
77- { name : 'WEB SOCKET ' , route : '/websocket' , value : 'ws' } ,
78- { name : 'WEBRTC ' , route : '/webrtc' , value : 'webrtc' } ,
79- { name : 'OPENAPI ' , route : '/openapi' , value : 'openapi' } ,
80- { name : 'WEBHOOK ' , route : '/webhook' , value : 'webhook' } ,
118+ { name : 'HTTP/2 ' , route : '/' , value : 'rest' } ,
119+ { name : 'GraphQL ' , route : '/graphql' , value : 'graphQL' } ,
120+ { name : 'gRPC ' , route : '/grpc' , value : 'grpc' } ,
121+ { name : 'WebSocket ' , route : '/websocket' , value : 'ws' } ,
122+ { name : 'WebRTC ' , route : '/webrtc' , value : 'webrtc' } ,
123+ { name : 'OpenAPI ' , route : '/openapi' , value : 'openapi' } ,
124+ { name : 'Webhook ' , route : '/webhook' , value : 'webhook' } ,
81125]
82126
83127/**
@@ -274,10 +318,10 @@ function ProtocolSelect(props) {
274318 key = { page . name }
275319 to = { page . route }
276320 >
277- < Button
321+ < CustomButton
278322 key = { page . name }
279- variant = "contained"
280- color = "primary"
323+ // variant="contained"
324+ // color="primary"
281325 onClick = { ( ) => {
282326 console . log ( page . value )
283327 onProtocolSelect ( page . value ) }
@@ -286,7 +330,7 @@ function ProtocolSelect(props) {
286330 m : 1
287331 } } >
288332 { page . name }
289- </ Button >
333+ </ CustomButton >
290334 </ Link >
291335 ) ) }
292336 </ Box >
0 commit comments