本文整理汇总了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))
}
示例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]};
`;
示例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;
`;
示例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;
}
`;
示例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]};
`;
示例6: styled
import styled from "@emotion/styled";
import { spacing } from "../constants";
export const Form = styled("form")`
margin: ${spacing[2]} 0;
`;
示例7: styled
import styled from "@emotion/styled";
import { spacing } from "../constants";
export const UnorderedList = styled("ul")`
margin: 0;
padding-left: ${spacing[1]};
`;
示例8: styled
import styled from "@emotion/styled";
import { spacing } from "../constants";
export const ListItem = styled("li")`
margin: ${spacing[0]} 0;
`;
示例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]};
`;