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


TypeScript styling.getTheme函數代碼示例

本文整理匯總了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)
  };
}
開發者ID:antonlabunets,項目名稱:office-ui-fabric-react,代碼行數:28,代碼來源:ColorPage.styles.ts

示例2: getStyles

export function getStyles(theme: ITheme = getTheme()): IIconPageStyles {
  return {
    container: mergeStyles({
      display: 'flex',
      justifyContent: 'center',
      flexWrap: 'wrap'
    })
  };
}
開發者ID:antonlabunets,項目名稱:office-ui-fabric-react,代碼行數:9,代碼來源:IconPage.styles.ts

示例3: getStyles

export function getStyles(theme: ITheme = getTheme()): IPageHeaderStyles {
  return {
    root: mergeStyles(
      theme.fonts.xLarge,
      {
        paddingBottom: '20px'
      }
    )
  };
}
開發者ID:antonlabunets,項目名稱:office-ui-fabric-react,代碼行數:10,代碼來源:PageHeader.styles.ts

示例4: getStyles

export function getStyles(theme: ITheme = getTheme()): IPageStyles {
  return {
    root: mergeStyles(
      theme.fonts.medium,
      {
        padding: '20px'
      }
    )
  };
}
開發者ID:antonlabunets,項目名稱:office-ui-fabric-react,代碼行數:10,代碼來源:Page.styles.ts

示例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'
      })
  };
}
開發者ID:antonlabunets,項目名稱:office-ui-fabric-react,代碼行數:51,代碼來源:IconTile.styles.ts

示例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'
      })
  };
}
開發者ID:antonlabunets,項目名稱:office-ui-fabric-react,代碼行數:14,代碼來源:FontPage.styles.ts

示例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'
    })
  };
}
開發者ID:antonlabunets,項目名稱:office-ui-fabric-react,代碼行數:21,代碼來源:AnimationPage.styles.ts

示例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
    })
  };
}
開發者ID:cmalonzo,項目名稱:office-ui-fabric-react,代碼行數:67,代碼來源:AnimationTile.styles.ts


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