Skip to content

Commit aa120b7

Browse files
Merge pull request #741 from glints-dev/feature/index-table-css
Index table styles
2 parents 8fa44a8 + 3ebdde2 commit aa120b7

10 files changed

+1743
-16
lines changed

src/@next/IndexTable/IndexTable.stories.tsx

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
} from './IndexTable';
88
import { BaseContainer } from '../../Layout/GlintsContainer/GlintsContainer';
99
import { Typography } from '..';
10-
import 'polaris-glints/build/esm/styles.css';
1110
import { Icon } from '../Icon';
1211
import { PrimaryButton } from '../Button';
1312
import {
@@ -145,14 +144,34 @@ const Template: Story<IndexTableProps> = args => {
145144
<Icon name="ri-account-circle-fill" height={40} fill={Neutral.B40} />
146145
</IndexTable.Cell>
147146
<IndexTable.Cell>
148-
<Typography variant="body2">{name}</Typography>
149-
<Typography variant="body1">{location}</Typography>
147+
<div style={{ display: 'flex', flexDirection: 'column' }}>
148+
<Typography as="span" variant="body2">
149+
{name}
150+
</Typography>
151+
<Typography as="span" variant="body1">
152+
{location}
153+
</Typography>
154+
</div>
150155
</IndexTable.Cell>
151-
<IndexTable.Cell>{expectedSalary}</IndexTable.Cell>
152-
<IndexTable.Cell>{yearsExperience}</IndexTable.Cell>
153156
<IndexTable.Cell>
154-
<Typography variant="body1">{latestWorkExperience}</Typography>
155-
<Typography variant="caption">{latestWorkDuration}</Typography>
157+
<Typography as="span" variant="body1">
158+
{expectedSalary}
159+
</Typography>
160+
</IndexTable.Cell>
161+
<IndexTable.Cell>
162+
<Typography as="span" variant="body1">
163+
{yearsExperience}
164+
</Typography>
165+
</IndexTable.Cell>
166+
<IndexTable.Cell>
167+
<div style={{ display: 'flex', flexDirection: 'column' }}>
168+
<Typography as="span" variant="body1">
169+
{latestWorkExperience}
170+
</Typography>
171+
<Typography as="span" variant="caption">
172+
{latestWorkDuration}
173+
</Typography>
174+
</div>
156175
</IndexTable.Cell>
157176
<IndexTable.Cell>
158177
<StyledButtonGroup>

src/@next/IndexTable/IndexTable.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
import { Checkbox } from '../Checkbox';
88
import { CheckboxProps } from '../Checkbox';
99
import { Row } from './components/Row/Row';
10+
import { StyledIndexTable } from './IndexTableStyle';
1011

1112
const IndexTable = ({
1213
bulkActions,
@@ -31,15 +32,18 @@ const IndexTable = ({
3132
};
3233

3334
return (
34-
<PolarisIndexTable
35-
bulkActions={bulkActions}
36-
checkbox={renderCheckboxHeader}
37-
itemCount={itemCount}
38-
selectedItemsCount={selectedItemsCount}
39-
{...props}
40-
>
41-
{children}
42-
</PolarisIndexTable>
35+
<>
36+
<StyledIndexTable />
37+
<PolarisIndexTable
38+
bulkActions={bulkActions}
39+
checkbox={renderCheckboxHeader}
40+
itemCount={itemCount}
41+
selectedItemsCount={selectedItemsCount}
42+
{...props}
43+
>
44+
{children}
45+
</PolarisIndexTable>
46+
</>
4347
);
4448
};
4549

0 commit comments

Comments
 (0)