@equinor/fusion-react-ag-grid-styles
v31.2.1
Published
React addons for ag-grid styles
Downloads
4,763
Readme
AG Grid Styles
Install
npm install @equinor/fusion-react-ag-grid-styles
About
The hook adds the theme alpine-fusion
to your ag-grid instance without adding global stylesheet to the portal.
It sets up the required variables and classnames for use in your component in a scoped naming scheme.
You do not need any other styles from the ag-grid package or other fusion packages.
Usage
Add the
root
item from the hook to set up required variables in your scope.And set the theme name to
ag-theme-alpine-fusion
import AgGridReact from '@ag-grid-community/core';
import useStyles from '@equinor/fusion-react-ag-grid-styles';
const MyComponent = (): JSX.Element => {
const styles = useStyles();
return (
<div className={ styles.root }>
<div className='ag-theme-alpine-fusion'>
<AgGridReact { ...props } />
</div>
</div>
);
};