本文整理匯總了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);