本文整理匯總了TypeScript中@uifabric/styling.getTheme函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript getTheme函數的具體用法?TypeScript getTheme怎麽用?TypeScript getTheme使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了getTheme函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: getStyles
export function getStyles(theme: ITheme = getTheme()): IColorPageStyles {
return {
swatch: mergeStyles({
display: 'inline-block',
verticalAlign: 'middle',
width: 20,
height: 20,
borderRadius: '50%',
marginRight: '8px'
}),
cell: mergeStyles(
theme.fonts.small,
{
display: 'inline-block',
verticalAlign: 'middle',
}),
cellWithBorder: mergeStyles({
borderWidth: '1px',
borderStyle: 'solid'
}),
swatchText: mergeStyles({
display: 'inline-block',
verticalAlign: 'middle',
}),
example: mergeStyles(theme.fonts.mediumPlus)
};
}
示例2: getStyles
export function getStyles(theme: ITheme = getTheme()): IIconPageStyles {
return {
container: mergeStyles({
display: 'flex',
justifyContent: 'center',
flexWrap: 'wrap'
})
};
}
示例3: getStyles
export function getStyles(theme: ITheme = getTheme()): IPageHeaderStyles {
return {
root: mergeStyles(
theme.fonts.xLarge,
{
paddingBottom: '20px'
}
)
};
}
示例4: getStyles
export function getStyles(theme: ITheme = getTheme()): IPageStyles {
return {
root: mergeStyles(
theme.fonts.medium,
{
padding: '20px'
}
)
};
}
示例5: getStyles
export function getStyles(theme: ITheme = getTheme()): IIconTileStyles {
return {
iconTile: mergeStyles(
theme.fonts.small,
{
flexShrink: 0,
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
margin: '5px',
width: 150,
height: 80,
opacity: .6,
cursor: 'default',
outline: 'none',
position: 'relative',
':focus:after': {
content: '""',
position: 'absolute',
left: 0,
top: 0,
right: 0,
bottom: 0,
border: '1px solid ' + theme.palette.themePrimary,
},
':focus': {
...AnimationStyles.fadeIn500,
color: theme.palette.themePrimary,
opacity: 1,
background: theme.palette.themeLighterAlt
},
':hover': {
opacity: 1,
background: theme.palette.themeLighterAlt
},
':focus:hover': {
background: theme.palette.themeLight
}
}),
icon: mergeStyles(
theme.fonts.icon,
{
fontSize: '36px',
paddingBottom: '8px'
})
};
}
示例6: getStyles
export function getStyles(theme: ITheme = getTheme()): IFontPageRules {
return {
row: mergeStyles({
paddingBottom: '10px',
borderBottom: '1px solid ' + theme.palette.themeLighterAlt,
userSelect: 'none'
}),
cell: mergeStyles(
theme.fonts.small,
{
paddingRight: '20px'
})
};
}
示例7: getStyles
export function getStyles(theme: ITheme = getTheme()): IAnimationPageStyles {
return {
grid: mergeStyles({
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'stretch',
margin: '-8px'
}),
blue: mergeStyles({
background: theme.palette.themeSecondary
}),
tile: mergeStyles({
flexGrow: 1,
minWidth: '200px',
maxWidth: '400px',
padding: '8px'
})
};
}
示例8: getStyles
export function getStyles(theme: ITheme = getTheme()): IAnimationTileStyles {
return {
root: mergeStyles({
marginBottom: '20px'
}),
title: mergeStyles({
...theme.fonts.medium,
marginBottom: '8px'
}),
container: mergeStyles({
overflow: 'hidden',
position: 'relative',
maxWidth: '400px',
height: '100px',
border: '1px solid black',
backgroundImage:
'url("data:image/svg+xml;base64,' + 'PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMCcgaGVpZ2h0PScxMCc' +
'+CiAgPHJlY3Qgd2lkdGg9JzEwJyBoZWlnaHQ9JzEwJyBmaWxsPSd3aGl0ZScvPgogIDxwYXRoIGQ9J00tMSwx' +
'IGwyLC0yCiAgICAgICAgICAgTTAsMTAgbDEwLC0xMAogICAgICAgICAgIE05LDExIGwyLC0yJyBzdHJva2U9J' +
'2JsYWNrJyBzdHJva2Utd2lkdGg9JzEnLz4KPC9zdmc+Cg==")',
backgroundRepeat: 'repeat',
}),
animationBox: mergeStyles({
position: 'absolute',
background: theme.palette.themePrimary,
width: '25%',
height: '100%'
}),
isLeft: mergeStyles({
left: 0,
top: 0,
width: '25%',
height: '100%'
}),
isRight: mergeStyles({
right: 0,
top: 0,
width: '25%',
height: '100%'
}),
isTop: mergeStyles({
left: 0,
top: 0,
width: '100%',
height: '50%'
}),
isBottom: mergeStyles({
left: 0,
bottom: 0,
width: '100%',
height: '50%'
}),
isIn: mergeStyles({
opacity: 0
})
};
}