【文件属性】:
文件名称:原子布局:布局组成的物理表示形式,用于在React中创建声明式响应式布局
文件大小:2.05MB
文件格式:ZIP
更新时间:2021-01-30 17:00:32
react atom styled-components layout composition
原子布局是React的空间分布库。 它使用定义布局区域并将其渲染为React组件。 这种模式鼓励元素和间距的分离,防止上下文实现并促进布局的维护。
import React from ' react '
import { Composition } from ' atomic-layout '
// Define layout areas: visual representation
// of what composes a layout, detached from
// what components are actually rendered.
const areasMobile = `
thumbnail
header
footer
`
// Declare responsive changes of your areas.
// Operate in two dimensions, remove areas
// or introduce new ones.
const areasTablet = `
thumbnail header
thumbnai