1.0.0 • Published 4 years ago

@txdfe/at-layout v1.0.0

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
4 years ago

at-layout


简介

AT 布局

使用说明

布局包括整体式和卡片式。

示例

import Layout from '@txdfe/at-layout';
import { ConfigProvider, locale, Card } from '@txdfe/at';
const enUS = locale['en-us'];

const LayoutSidebar = () => (
  <>
    <div style={{ width: '100%', height: '100%', background: '#888' }}>
      Sidebar
    </div>
  </>
);

const LayoutMain = () => (
  <>
    <div style={{ width: '100%', height: '100%', background: '#888' }}>
      Main
    </div>
  </>
);

const Demo = () => {
  const prefix = 'layout-whole-demo-1';

  return (
      <div className={prefix}>
        <Layout
          type="whole1"
          sidebar={<LayoutNav />}
          main={<LayoutMain />}
        />
      </div>
  );
}

API

参数类型可选值默认值说明
typestringwhole1, whole2, whole3, whole4, card1, card2, card3, card4, card5, card6, card7whole1主要内容
mainJSXElement必填null主要内容
sidebarJSXElement可选null边栏