-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ag-grid-styles): export default and named export from package
- Loading branch information
Showing
6 changed files
with
76 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
'@equinor/fusion-react-ag-grid-styles': patch | ||
'@equinor/fusion-react-components-stories': patch | ||
--- | ||
|
||
### Package `@equinor/fusion-react-ag-grid-styles` | ||
|
||
Changed export statement | ||
|
||
- `export { useStyles, useStyles as default } from './agGridStyles';` | ||
- Renamed `useAgGridStyles.ts` to `index.ts` in `ag-grid-styles` package. | ||
|
||
### Storybook | ||
|
||
Updated import paths and usage of `useAgGridStyles` to `useStyles` in `storybook` stories. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { useStyles as default } from './agGridStyles/useAgGridStyles'; | ||
export { useStyles, useStyles as default } from './agGridStyles'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { Meta } from '@storybook/react'; | ||
|
||
import { AgGridReact } from '@ag-grid-community/react'; | ||
|
||
import { useStyles } from '@equinor/fusion-react-ag-grid-styles'; | ||
|
||
import { ModuleRegistry } from '@ag-grid-community/core'; | ||
import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model'; | ||
import { faker } from '@faker-js/faker'; | ||
import { useRef } from 'react'; | ||
|
||
ModuleRegistry.registerModules([ClientSideRowModelModule]); | ||
|
||
const meta: Meta<typeof useStyles> = { | ||
title: 'ag-grid/styles', | ||
}; | ||
|
||
export default meta; | ||
|
||
faker.seed(0); | ||
|
||
export const AlpineFusionTheme = () => { | ||
useStyles(); | ||
const rowdData = Array.from({ length: 5 }, () => ({ | ||
name: faker.person.firstName(), | ||
lastName: faker.person.lastName(), | ||
date: faker.date.past(), | ||
order: String(faker.number.int()), | ||
})); | ||
|
||
const columnDefs = [ | ||
{ field: 'name', editable: true }, | ||
{ field: 'lastName', editable: true }, | ||
{ field: 'date' }, | ||
{ field: 'order', editable: true }, | ||
]; | ||
const gridRef = useRef<AgGridReact | null>(null); | ||
|
||
return ( | ||
<> | ||
<div className="ag-theme-alpine-fusion" style={{ width: '1080px', height: '500px' }}> | ||
<AgGridReact ref={gridRef} rowData={rowdData} columnDefs={columnDefs}></AgGridReact> | ||
</div> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters