本文整理汇总了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);
示例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);
示例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);
示例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);