go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/milo/ui/src/common/themes/base.tsx (about)

     1  // Copyright 2023 The LUCI Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  import { createTheme } from '@mui/material';
    16  
    17  export const theme = createTheme({
    18    palette: {
    19      scheduled: {
    20        main: '#73808c',
    21      },
    22      started: {
    23        main: '#ff8000',
    24      },
    25      success: {
    26        main: '#169c16',
    27      },
    28      error: {
    29        main: '#d23a2d',
    30      },
    31      criticalFailure: {
    32        main: '#6c40bf',
    33      },
    34      canceled: {
    35        main: '#0084ff',
    36      },
    37      dividerLine: {
    38        main: '#e0e0e0',
    39      },
    40    },
    41  });
    42  
    43  declare module '@mui/material/styles' {
    44    interface Palette {
    45      scheduled: Palette['primary'];
    46      started: Palette['primary'];
    47      success: Palette['primary'];
    48      criticalFailure: Palette['primary'];
    49      canceled: Palette['primary'];
    50      dividerLine: Palette['primary'];
    51    }
    52  
    53    interface PaletteOptions {
    54      scheduled: PaletteOptions['primary'];
    55      started: PaletteOptions['primary'];
    56      criticalFailure: PaletteOptions['primary'];
    57      canceled: PaletteOptions['primary'];
    58      dividerLine: PaletteOptions['primary'];
    59    }
    60  }
    61  
    62  declare module '@mui/material' {
    63    interface LinearProgressPropsColorOverrides {
    64      scheduled: true;
    65      started: true;
    66      success: true;
    67      criticalFailure: true;
    68      canceled: true;
    69      dividerLine: true;
    70    }
    71  }