• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript styleHelpers.debugHelper函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中@library/styles/styleHelpers.debugHelper函数的典型用法代码示例。如果您正苦于以下问题:TypeScript debugHelper函数的具体用法?TypeScript debugHelper怎么用?TypeScript debugHelper使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了debugHelper函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1: useThemeCache

export const drawerClasses = useThemeCache(() => {
    const vars = drawerVariables();
    const debug = debugHelper("drawer");

    const root = style({
        display: "block",
        position: "relative",
        ...debug.name(),
    });

    const contents = style({
        position: "relative",
        width: percent(100),
        ...debug.name("contents"),
    });

    const toggle = style({
        fontWeight: vars.fonts.weight,
        padding: `${unit(vars.spacing.button.padding)} 0`,
        width: percent(100),
        textAlign: "left",
        ...debug.name("toggle"),
    });
    const icon = style({
        display: "inline-flex",
        minWidth: unit(vars.sizing.icon),
        fontSize: unit(vars.fonts.size),
        ...debug.name("icon"),
    });

    return { root, contents, toggle, icon };
});
开发者ID:vanilla,项目名称:vanilla,代码行数:32,代码来源:drawerStyles.ts


示例2: useThemeCache

export const userDropDownClasses = useThemeCache(() => {
    const globalVars = globalVariables();
    const vars = userDropDownVariables();
    const debug = debugHelper("userDropDown");

    const userCardPhotoLink = style({
        display: "block",
        ...debug.name("userCardPhotoLink"),
    });

    const userCardPhoto = style({
        border: `solid 1px ${globalVars.mixBgAndFg(0.3)}`,
        marginTop: unit(vars.userCard.topMargin),
        marginLeft: "auto",
        marginRight: "auto",
        ...debug.name("userCardPhoto"),
    });

    const userCardName = style({
        display: "block",
        color: "inherit",
        fontWeight: vars.userName.fontWeight,
        fontSize: unit(vars.userName.fontSize),
        lineHeight: vars.userName.lineHeight,
        textAlign: "center",
        marginTop: unit(vars.userName.topMargin),
        marginRight: "auto",
        marginBottom: unit(vars.userName.bottomMargin),
        marginLeft: "auto",
        paddingRight: unit(vars.userName.paddingRight),
        paddingLeft: unit(vars.userName.paddingLeft),
        ...debug.name("userCardName"),
    });

    const contents = style({
        width: unit(vars.contents.width),
        ...debug.name("contents"),
    });

    return { userCardPhotoLink, userCardPhoto, userCardName, contents };
});
开发者ID:vanilla,项目名称:vanilla,代码行数:41,代码来源:userDropDownStyles.ts


示例3: useThemeCache

export const meBoxClasses = useThemeCache(() => {
    const globalVars = globalVariables();
    const formVars = formElementsVariables();
    const titleBarVars = titleBarVariables();
    const debug = debugHelper("meBox");
    const mediaQueries = layoutVariables().mediaQueries();
    const flex = flexHelper();
    const style = styleFactory("meBox");

    const root = style(
        {
            ...debug.name(),
            display: "flex",
            alignItems: "center",
            height: unit(titleBarVars.sizing.height),
        },
        mediaQueries.oneColumnDown({
            height: unit(titleBarVars.sizing.mobile.height),
        }),
    );

    const buttonContent = style("buttonContent", {
        ...flex.middle(),
        width: unit(formVars.sizing.height),
        maxWidth: unit(formVars.sizing.height),
        flexBasis: unit(formVars.sizing.height),
        height: unit(titleBarVars.meBox.sizing.buttonContents),
    });

    const rootFlexClass = (count: number) => {
        return style("footFlexClass", {
            flexBasis: unit(count * formElementsVariables().sizing.height),
        });
    };

    return {
        root,
        buttonContent,
        rootFlexClass,
    };
});
开发者ID:vanilla,项目名称:vanilla,代码行数:41,代码来源:meBoxStyles.ts


示例4: useThemeCache

export const searchClasses = useThemeCache(() => {
    const vars = searchVariables();
    const debug = debugHelper("search");

    const root = style({
        ...debug.name(),
        $nest: {
            ".inputText": {
                borderColor: vars.input.border.color.toString(),
            },
            ".searchBar-valueContainer": {
                ...debug.name("valueContainer"),
                cursor: "text",
            },
            ".searchBar__control": {
                ...debug.name("control"),
                cursor: "text",
            },
        },
    });

    return { root };
});
开发者ID:vanilla,项目名称:vanilla,代码行数:23,代码来源:searchStyles.ts


示例5: useThemeCache

export const userPhotoClasses = useThemeCache(() => {
    const vars = userPhotoVariables();
    const debug = debugHelper("userPhoto");

    const root = style({
        ...debug.name(),
        position: "relative",
        borderRadius: vars.border.radius,
        overflow: "hidden",
    });

    const photo = style({
        ...objectFitWithFallback(),
        ...debug.name("photo"),
    });

    const small = style({
        width: unit(vars.sizing.small),
        height: unit(vars.sizing.small),
        ...debug.name("small"),
    });

    const medium = style({
        width: unit(vars.sizing.medium),
        height: unit(vars.sizing.medium),
        ...debug.name("medium"),
    });

    const large = style({
        width: unit(vars.sizing.large),
        height: unit(vars.sizing.large),
        ...debug.name("large"),
    });

    return { root, small, medium, large, photo };
});
开发者ID:vanilla,项目名称:vanilla,代码行数:36,代码来源:userPhotoStyles.ts


示例6: useThemeCache

export const simplePagerClasses = useThemeCache(() => {
    const vars = simplePagerVariables();
    const debug = debugHelper("simplePager");

    const root = style({
        alignItems: "center",
        display: "flex",
        justifyContent: "center",
        margin: `${unit(vars.spacing.outerMargin)} 0`,
        ...debug.name(),
    });

    const button = {
        margin: unit(vars.spacing.innerMargin),
        $nest: {
            "&.isSingle": {
                minWidth: unit(vars.sizing.minWidth),
            },
        },
        ...debug.name("button"),
    };

    return { root, button };
});
开发者ID:vanilla,项目名称:vanilla,代码行数:24,代码来源:simplePagerStyles.ts


示例7: useThemeCache

export const subcommunityTileClasses = useThemeCache(() => {
    const vars = subcommunityTileVariables();
    const globalVars = globalVariables();
    const debug = debugHelper("subcommunityTile");
    const shadow = shadowHelper();

    const root = style({
        display: "flex",
        flexDirection: "column",
        alignItems: "stretch",
        width: percent(100),
        padding: unit(vars.spacing.default),
        ...userSelect(),
        flexGrow: 1,
        ...debug.name(),
    });

    const link = style({
        ...defaultTransition("box-shadow", "border"),
        ...paddings(vars.link.padding),
        display: "block",
        position: "relative",
        cursor: "pointer",
        flexGrow: 1,
        color: vars.link.fg.toString(),
        backgroundColor: colorOut(vars.link.bg),
        borderRadius: unit(2),
        minHeight: unit(vars.link.minHeight),
        ...shadowOrBorderBasedOnLightness(
            globalVars.body.backgroundImage.color,
            borders({
                color: vars.link.fg.fade(0.3),
            }),
            shadow.embed(),
        ),
        $nest: {
            "&:hover": {
                ...shadowOrBorderBasedOnLightness(
                    globalVars.body.backgroundImage.color,
                    borders({
                        color: vars.link.fg.fade(0.5),
                    }),
                    shadow.embedHover(),
                ),
            },
        },
        ...debug.name("link"),
    });

    const main = style({
        position: "relative",
        ...debug.name("main"),
    });

    const frame = style({
        display: "flex",
        alignItems: "center",
        justifyContent: "center",
        position: "relative",
        height: unit(vars.frame.height),
        width: unit(vars.frame.width),
        marginTop: "auto",
        marginRight: "auto",
        marginLeft: "auto",
        marginBottom: unit(vars.frame.bottomMargin),
        ...debug.name("iconFrame"),
    });

    const icon = style({
        display: "block",
        position: "absolute",
        top: 0,
        right: 0,
        bottom: 0,
        left: 0,
        margin: "auto",
        height: "auto",
        maxWidth: percent(100),
        maxHeight: percent(100),
        ...debug.name("icon"),
    });

    const title = style({
        fontSize: unit(vars.title.fontSize),
        lineHeight: vars.title.lineHeight,
        textAlign: "center",
        marginBottom: unit(vars.title.marginBottom),
        ...debug.name("title"),
    });

    const description = style({
        position: "relative",
        marginTop: unit(vars.description.marginTop),
        fontSize: unit(vars.description.fontSize),
        lineHeight: vars.description.lineHeight,
        textAlign: "center",
        ...debug.name("description"),
    });

    const fallBackIcon = style({
//.........这里部分代码省略.........
开发者ID:vanilla,项目名称:vanilla,代码行数:101,代码来源:subcommunityTitleStyles.ts


示例8: useThemeCache

export const dayPickerClasses = useThemeCache(() => {
    const debug = debugHelper("dayPicker");
    const vars = dayPickerVariables();

    // From third party, so we're targetting them this way
    const root = style({
        ...debug.name(),
        $nest: {
            "& .DayPicker-wrapper": {
                ...debug.name("AMIBHERE"),
                padding: 0,
            },
            "& .DayPicker-Month": {
                margin: unit(vars.spacing.padding),
            },
            "& .DayPicker-Day": {
                borderRadius: unit(vars.border.radius),
                padding: unit(vars.spacing.padding),
                whiteSpace: "nowrap",
                $nest: {
                    "&:hover": {
                        backgroundColor: vars.colors.hover.bg.toString(),
                    },
                },
            },
            "& .DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside)": {
                backgroundColor: vars.colors.selected.color.toString(),
                $nest: {
                    "&:hover": {
                        backgroundColor: vars.colors.selected.color.toString(),
                    },
                },
            },
            "& .DayPicker-Day--today": {
                color: vars.colors.today.toString(),
            },
        },
    });

    const header = style({
        display: "flex",
        alignItems: "center",
        height: unit(vars.sizing.height),
        paddingLeft: unit(vars.spacing.padding),
        marginTop: unit(vars.spacing.padding),
        ...debug.name("header"),
    });

    const title = style({
        flex: 1,
        padding: unit(vars.spacing.padding),
        ...debug.name("title"),
    });

    const navigation = style({
        display: "flex",
        alignItems: "center",
        ...debug.name("navigation"),
    });

    return { root, header, title, navigation };
});
开发者ID:vanilla,项目名称:vanilla,代码行数:62,代码来源:datePickerStyles.ts



注:本文中的@library/styles/styleHelpers.debugHelper函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript styleHelpers.flexHelper函数代码示例发布时间:2022-05-28
下一篇:
TypeScript styleHelpers.colorOut函数代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap