本文整理匯總了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]};
`;