@laser-ui/components
v2.0.2
Published
React components.
Downloads
269
Maintainers
Readme
English | 简体中文
Installation
npm install @laser-ui/components @laser-ui/hooks @laser-ui/themes @laser-ui/utils
Getting Started
import type { LContextIn } from '@laser-ui/components/context';
import { ConfigProvider, Root } from '@laser-ui/components';
import { useMemo } from 'react';
export default function App() {
const lContext = useMemo<LContextIn>(
() => ({
layoutPageScrollEl: '#app-main',
layoutContentResizeEl: '#app-content',
}),
[],
);
return (
<ConfigProvider context={lContext}>
<Root>
<main id="app-main" style={{ overflow: 'auto' }}>
<section id="app-content" style={{ height: '200vh' }}>
Some content...
</section>
</main>
</Root>
</ConfigProvider>
);
}
Links
Contributing
Please read our contributing guide first.