How to use the typography.body.fontFamily function in typography

To help you get started, we’ve selected a few typography examples, based on popular ways it is used in public projects.

github Autodesk / hig / packages / text-link / src / stylesheet.js View on Github external
export default function stylesheet(props, themeData) {
  const { hasHover, hasFocus } = props;

  return {
    // from base typography-medium
    fontWeight: themeData["typography.body.fontWeight"],
    fontSize: themeData["typography.body.fontSize"],
    lineHeight: themeData["typography.body.lineHeight"],

    // from typography-base
    fontFamily: themeData["typography.body.fontFamily"],
    margin: 0,

    // from default-link
    textDecoration: "none",
    cursor: "pointer",

    color: themeData["textLink.textColor"],
    outline: "none",

      ? {
          color: themeData["textLink.hover.textColor"],
          textDecoration: "underline",
          textDecorationColor: themeData["textLink.hover.underline.color"]
      : {}),