vega-frontend-monorepo/libs/ui-toolkit/src/components/ag-grid/ag-grid-light.tsx
macqbat 51712f4c20
Feat/526 consolelite design update market list (#635)
* feat: [console-lite] - market list - improve list view

* feat: [console-lite] - market list - add column sorting, improve ag-grid styles

* feat: [console-lite] - market list - remove unnecessary changes

* feat: [console-lite] - market list - fixes for eslint errors

* feat: [console-lite] - market list - remove redundant changes

* feat: [console-lite] - market list - add resize handler and other small improvements

Co-authored-by: maciek <maciek@vegaprotocol.io>
2022-06-28 11:57:47 +02:00

43 lines
1.0 KiB
TypeScript

import type { ReactNode } from 'react';
import { theme } from '@vegaprotocol/tailwindcss-config';
import 'ag-grid-community/dist/styles/ag-theme-balham.css';
const agGridLightVariables = `
.ag-theme-balham {
--ag-background-color: ${theme.colors.white[100]};
--ag-border-color: ${theme.colors.black['05']};
--ag-header-background-color: ${theme.colors.white[100]};
--ag-odd-row-background-color: ${theme.colors.white[100]};
--ag-row-border-color: ${theme.colors.white[100]};
--ag-row-hover-color: ${theme.colors.black[10]};
--ag-font-size: 12px;
}
.ag-theme-balham .ag-root-wrapper {
border: 0;
}
.ag-theme-balham .ag-react-container {
overflow: hidden;
text-overflow: ellipsis;
}
.ag-theme-balham-dark .ag-header-row {
font-weight: 400;
}
`;
export const AgGrid = ({
children,
customThemeParams,
}: {
children: ReactNode;
customThemeParams?: string;
}) => (
<>
<style>{agGridLightVariables}</style>
{customThemeParams && <style>{customThemeParams}</style>}
{children}
</>
);