當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript variants.addVariants函數代碼示例

本文整理匯總了TypeScript中@uifabric/variants.addVariants函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript addVariants函數的具體用法?TypeScript addVariants怎麽用?TypeScript addVariants使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了addVariants函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: addVariants

            borderWidth: 1
          },
          !props.disabled && {
            iconColor: '#252424', // this hardcoding doesn't work well with variants
            borderColorHovered: 'transparent',
            borderColorPressed: 'transparent'
          },
          props.expanded && {
            borderColor: 'transparent'
          },
          props.circular &&
            !props.disabled && {
              backgroundColorHovered: '#464775', // this hardcoding doesn't work well with variants
              backgroundColorPressed: '#464775', // this hardcoding doesn't work well with variants
              textColorHovered: '#fff',
              textColorPressed: '#fff',
              iconColorHovered: '#fff',
              iconColorPressed: '#fff'
            },
          props.primary &&
            !props.disabled && {
              iconColor: 'white'
            }
        ];
      }
    }
  }
};

addVariants(TeamsCustomizations.settings.theme);
開發者ID:OfficeDev,項目名稱:office-ui-fabric-react,代碼行數:30,代碼來源:TeamsCustomizations.ts

示例2: addVariants

      semanticColors: {
        buttonBackground: 'white',
        buttonBackgroundHovered: 'rgb(240, 240, 240)',
        buttonBackgroundPressed: 'rgb(240, 240, 240)',
        buttonText: 'rgb(43, 87, 154)',
        buttonBorder: 'rgb(237, 235, 233)'
      }
    })
  },

  scopedSettings: {
    Button: {
      styleVariables: {
        baseVariant: {
          baseState: {
            borderWidth: 1,
            minHeight: 26,
            textSize: 13.5,
            lineHeight: 13.5,
            textWeight: 600,
            iconSize: 12,
            contentPadding: '0px 6px'
          }
        }
      }
    }
  }
};

addVariants(WordCustomizations.settings.theme);
開發者ID:atneik,項目名稱:office-ui-fabric-react,代碼行數:30,代碼來源:WordCustomizations.ts

示例3: addVariants

import { FluentTheme } from './fluent/FluentTheme';
import { FluentStyles } from './fluent/FluentStyles';
import { ICustomizations } from 'office-ui-fabric-react';
import { addVariants } from '@uifabric/variants';

export const FluentCustomizations: ICustomizations = {
  settings: {
    theme: { ...FluentTheme }
  },
  scopedSettings: { ...FluentStyles }
};

addVariants(FluentCustomizations.settings.theme);
開發者ID:OfficeDev,項目名稱:office-ui-fabric-react,代碼行數:13,代碼來源:FluentCustomizations.ts

示例4: createTheme

import { createTheme, ICustomizations } from 'office-ui-fabric-react';
import { addVariants } from '@uifabric/variants';

export const DefaultCustomizations: ICustomizations = {
  settings: {
    theme: createTheme({})
  },
  scopedSettings: {}
};

addVariants(DefaultCustomizations.settings.theme);
開發者ID:OfficeDev,項目名稱:office-ui-fabric-react,代碼行數:11,代碼來源:DefaultCustomizations.ts


注:本文中的@uifabric/variants.addVariants函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。