Root
The Root component provides your React tree with a RootContext which contains general
options such as isRtl to indicate right to left language direction. It also provides a
.nfd-root CSS class for scoping our CSS in opinionated environments.
You can use the RootContext by using the useRootContext hook.
Root Contents
Usage
/src/App.js
import { Root } from "@newfold/ui-component-library";
export const App = () => {
return (
<Root>
// Your app contents
<p>Root Contents</p>
</Root>
);
};
Props
| Attribute | Type | Description | Default |
|---|---|---|---|
| children | node | | The content of your application. | - |
| context | { isRtl: bool } | | - | { isRtl: false } |