@a-la/bulma 中文文档教程
@a-la/bulma
@a-la/bulma
是 JSX 的 Bulma 类属性和类型定义。
yarn add -D @a-la/bulma
npm i --save-dev @a-la/bulma
Table Of Contents
Usage
通过安装此包,您将能够在使用 alamode< 时将标签和组件上的类指定为 JSX 属性/code>
转译器。
要获得对自动完成的访问权限,您需要在源代码中导入 @a-la/bulma
包:
import '@a-la/bulma'
// or when using Preact 8:
import '@a-la/bulma/preact'
export const Component =
() => (<div modal>Hello World</div>)
实际导入不会执行任何操作,因为源文件是空白的。 只有 VSCode 需要它来获取分布式类型。
由于 VSCode 中的错误,您将看不到带有连字符的属性,例如,is-loading
并且只会看到 isLoading
,但实际上您可以同时使用两者。 添加驼峰案例是为了类的可发现性。
看到 Wiki 中布尔玛类的完整列表。
Closure Stylesheets
Bulma 0.8.0 的注释版本在 bulma/bulma.css
中可用,其中添加了 /* @alternate */
注释以与 闭包样式表。
Copyright & License
GNU Affero 通用公共许可证 v3.0
© Art Deco™ for À La Mode 2020 |
---|
@a-la/bulma
@a-la/bulma
is Bulma Class Properties And Types Definitions For JSX.
yarn add -D @a-la/bulma
npm i --save-dev @a-la/bulma
Table Of Contents
Usage
By installing this package, you will be able to specify classes on tags and components as JSX properties when using alamode
transpiler.
To receive access to auto-completions, you'll need to import the @a-la/bulma
package in your source code:
import '@a-la/bulma'
// or when using Preact 8:
import '@a-la/bulma/preact'
export const Component =
() => (<div modal>Hello World</div>)
The actual import doesn't do anything as the source file is blank. It is needed only for VSCode to pick up distributed typings.
Because of a bug in VSCode, you won't see properties with hyphens, e.g., is-loading
and will only see isLoading
, but you can actually use both. The camel cases are added for discoverability of classes.
See the ???? full list of Bulma classes in Wiki.
Closure Stylesheets
An annotated version of Bulma 0.8.0 is available in bulma/bulma.css
where /* @alternate */
annotations were added for compatibility with Closure Stylesheets.
Copyright & License
GNU Affero General Public License v3.0
© Art Deco™ for À La Mode 2020 |
---|