Skip to content

Commit

Permalink
[fix] fix csv table examples for layers (#2921)
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
  • Loading branch information
igorDykhta authored Jan 20, 2025
1 parent a6e151a commit e2bd71d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 23 deletions.
27 changes: 27 additions & 0 deletions src/layers/src/example-table.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project

import styled from 'styled-components';

export const StyledTable = styled.table`
width: 100%;
border-spacing: 0;
thead {
tr th {
background: ${props => props.theme.panelBackgroundLT};
color: ${props => props.theme.titleColorLT};
padding: 18px 12px;
text-align: start;
}
}
tbody {
tr td {
border-bottom: ${props => props.theme.panelBorderLT};
padding: 12px;
}
}
`;

export default StyledTable;
2 changes: 1 addition & 1 deletion src/layers/src/geojson-layer/geojson-info-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {useIntl} from 'react-intl';

import {FormattedMessage} from '@kepler.gl/localization';

import Table from '../table';
import Table from '../example-table';

const InfoModal = styled.div`
font-size: 13px;
Expand Down
3 changes: 2 additions & 1 deletion src/layers/src/icon-layer/icon-info-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import React from 'react';
import styled from 'styled-components';
import {line} from 'd3-shape';
import {FormattedMessage} from '@kepler.gl/localization';
import Table from '../table';

import Table from '../example-table';

const CenterFlexbox = styled.div`
display: flex;
Expand Down
21 changes: 1 addition & 20 deletions src/layers/src/scenegraph-layer/scenegraph-info-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,7 @@
import React from 'react';
import styled from 'styled-components';

export const Table = styled.table`
width: 100%;
border-spacing: 0;
thead {
tr th {
background: ${props => props.theme.panelBackgroundLT};
color: ${props => props.theme.titleColorLT};
padding: 18px 12px;
text-align: start;
}
}
tbody {
tr td {
border-bottom: ${props => props.theme.panelBorderLT};
padding: 12px;
}
}
`;
import Table from '../example-table';

const StyledTitle = styled.div`
font-size: 20px;
Expand Down
2 changes: 1 addition & 1 deletion src/layers/src/trip-layer/trip-info-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {useIntl} from 'react-intl';

import {FormattedMessage} from '@kepler.gl/localization';

import Table from '../table';
import Table from '../example-table';

const InfoModal = styled.div`
font-size: 13px;
Expand Down

0 comments on commit e2bd71d

Please sign in to comment.