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


TypeScript styled.default函數代碼示例

本文整理匯總了TypeScript中@emotion/styled.default函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript default函數的具體用法?TypeScript default怎麽用?TypeScript default使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了default函數的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: emotionStyled

const styled: CreateStyledProxy = tag => styles => {
  const modifiers = extract(styles)

  return emotionStyled(tag, {
    shouldForwardProp: prop => !modifiers.includes(prop),
  })(styles.self, applyModifiers(styles))
}
開發者ID:monstrs,項目名稱:elementum,代碼行數:7,代碼來源:styled.ts

示例2: styled

import styled from "@emotion/styled";
import { breakPoints, fontSizes, spacing } from "../constants";

export const TextBlockCenter = styled("div")`
    text-align: justify;
    font-size: ${fontSizes[1]};
    max-width: ${breakPoints[3]};
    margin: 0 auto ${spacing[2]};
`;
開發者ID:stvnwn,項目名稱:windfall-elimination,代碼行數:9,代碼來源:text-block-center.ts

示例3: styled

import styled from "@emotion/styled";
import { spacing, breakPoints } from "../constants";

export const TextBlockHeader = styled("h3")`
    max-width: ${breakPoints[3]};
    margin: 0 auto ${spacing[0]};
    text-align: left;
`;
開發者ID:stvnwn,項目名稱:windfall-elimination,代碼行數:8,代碼來源:text-block-header.ts

示例4: styled

import styled from "@emotion/styled";
import { Link } from "gatsby";
import { spacing, colors, fontSizes, radii } from "../constants";

export const LinkButton = styled(Link)`
    padding: ${spacing[0]} ${spacing[0]};
    margin: ${spacing[0]} ${spacing[0]};
    height: 30px;
    background-color: ${colors.blue};
    font-size: ${fontSizes[0]};
    border-radius: ${radii[0]};
    color: ${colors.white};
    text-decoration: none;
    &:hover {
        background-color: ${colors.lightblue};
        cursor: pointer;
    }
`;
開發者ID:stvnwn,項目名稱:windfall-elimination,代碼行數:18,代碼來源:link-button.ts

示例5: styled

import styled from "@emotion/styled";
import { colors, spacing, radii } from "../constants";

export const Input = styled("input")`
    border-radius: ${radii[0]};
    margin: ${spacing[0]};
    border: 1px solid ${colors.gray};
    padding: ${spacing[0]};
`;
開發者ID:stvnwn,項目名稱:windfall-elimination,代碼行數:9,代碼來源:input.ts

示例6: styled

import styled from "@emotion/styled";
import { spacing } from "../constants";

export const Form = styled("form")`
    margin: ${spacing[2]} 0;
`;
開發者ID:stvnwn,項目名稱:windfall-elimination,代碼行數:6,代碼來源:form.ts

示例7: styled

import styled from "@emotion/styled";
import { spacing } from "../constants";

export const UnorderedList = styled("ul")`
    margin: 0;
    padding-left: ${spacing[1]};
`;
開發者ID:stvnwn,項目名稱:windfall-elimination,代碼行數:7,代碼來源:unordered-list.ts

示例8: styled

import styled from "@emotion/styled";
import { spacing } from "../constants";

export const ListItem = styled("li")`
    margin: ${spacing[0]} 0;
`;
開發者ID:stvnwn,項目名稱:windfall-elimination,代碼行數:6,代碼來源:list-item.ts

示例9: styled

import styled from "@emotion/styled";
import { spacing } from "../constants";

export const LinkWrapper = styled("div")`
    display: grid;
    justify-self: center;
    justify-content: center;
    width: 100%;
    gap: ${spacing[1]};
`;
開發者ID:stvnwn,項目名稱:windfall-elimination,代碼行數:10,代碼來源:link-wrapper.ts


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