English 中文(简体)
• 如何用多种习俗作风
原标题:How to style nativewind element with multiple custom styles

我想用我自己的习俗分类来描述具有某些特性的成分。 顺便说一句,你通过上诉程序这样做,但是,在一项反应中,没有当地应用。 • 如何添加一个标题类别,以便与某些特性相对缩小?

.title {
    font-size: 24px
    font-weight: 800
}

Applying it to Text JSX object:

<Text className="title">Title Text!</Text>
最佳回答

我列举了这种将多个部分捆绑起来的方法。 土著窗口和Tailwind建议不使用这一方法,但两者都使用。

In your tailwind.config.js file, add the following line of code above your module.exports:

const plugin = require("tailwindcss/plugin");

module.exports = {...}

Then in your plugins list, add:

plugin(function ({ addComponents }) {
        addComponents({
            ".title": {
                fontWeight: 800,
                fontSize: 24,
            },
        });
    }),

• 确保您的捆绑使用与反应性相同的财产名称,以及NOT cs(fontWala vs font-plus)。 重新启用服务器,它应当发挥作用!

问题回答

Very useful. Thanks to the author. Some of it has been used in several of my open source projects and has received 400 stars. I hope everyone can encourage me.

接下来的几句:https://github.com/anghanzhilian/c-shopping

反应本土(expo)电器:

页: 1 这方面的一揽子计划。 Install it from here

这一点在档案中的重要性。

import tw from “twrnc”;

And use it like this

<Text style={tw` text-2xl font-extrabold`}>Title Text!</Text>




相关问题
WPF share column width between separate grids

I have the following setup on my WPF UserControl: <GroupBox> <Grid> ... <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <...

Making a borderless window with for Qt

I m new to Qt C++. I downloaded the latest windows version, did some tutorials and its great. I saw some styling options that the Qt framework has and its great, but now I need to build my ...

Is there a styleguide for developing SWT applications?

I m not a proficient GUI developer, and I have no talent for design. Is there a comprehensive style guide for developing SWT applications? I m especially interested in standards for developing layouts,...

HTML element aside from headers <h1><h2>, ect

I was browsing related issues for my question but I can t seem to find the answer for it. Anyways, I want to know if I can still use the p or div tags instead of header tags when I have already used ...

Applying Dynamic Styles to Skins in Flex

I have a skin for a scrollbar thumb that I want to be able to style or set properties dynamically. <mx:Panel verticalScrollBarStyleName="verticalScrollBarNoArrows"> </mx:Panel> ...

CSS for widgets in gwt

i have few listbox widget, and i need to change the color of the arrow that opens the drop down list, and its surrounding box how can i do it with the CSS? is there an attribute list for all styles ...

热门标签