Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 811 Bytes

README.md

File metadata and controls

45 lines (32 loc) · 811 Bytes

Hooks - @axiscommunications/fluent-hooks

Hooks for use with fluent UI components

How to install

yarn add @axiscommunications/fluent-hooks
npm install @axiscommunications/fluent-hooks

Usage

import { usePageController } from "@axiscommunications/fluent-hooks";

const [skip, setSkip] = useState(0);
const [take, setTake] = useState(10);
const data = useDataCollector();

const pageController = usePageController({ total: data.length, skip, take });

  <MyTable skip={skip} take={take} />

  <MyTableFooter
    {...pageController}
    total={data.length}
    take={take}
    setTake={setTake}
  />
import { useMediaQuery } from "@axiscommunications/fluent-hooks";

const media = useMediaQuery();

if (media === "small"){
  return <Small />
}
return <Large />