Skip to content

Commit

Permalink
fix(tables): set SimpleTable.Td line-height & .CellLoader height to 22px
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed May 27, 2024
1 parent 6cc137e commit 176b161
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tables/SimpleTable/CellLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const cellLoaderAnimation = keyframes`
`
export const CellLoader = styled.div`
background: ${p => p.theme.color.gainsboro};
height: 18px;
height: 22px;
overflow: hidden;
position: relative;
Expand Down
1 change: 1 addition & 0 deletions src/tables/SimpleTable/Td.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const Td = styled.td.attrs<TdProps, TdProps>(props => ({
color: ${p => p.theme.color.gunMetal};
font-size: 13px;
font-weight: 500;
line-height: 22px;
max-width: 0;
overflow: hidden;
padding: 10px;
Expand Down
7 changes: 6 additions & 1 deletion stories/tables/SimpleTable/WithLoader.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react'

import { META_DEFAULTS } from '../../../.storybook/constants'
import { generateStoryDecorator } from '../../../.storybook/utils/generateStoryDecorator'
import { SimpleTable } from '../../../src'
import { Icon, IconButton, SimpleTable, Size } from '../../../src'

import type { Meta } from '@storybook/react'

Expand Down Expand Up @@ -45,6 +45,7 @@ export function WithLoader() {
<SimpleTable.Th $width={48}>ID</SimpleTable.Th>
<SimpleTable.Th $width={240}>Name</SimpleTable.Th>
<SimpleTable.Th $width={480}>Address</SimpleTable.Th>
<SimpleTable.Th $width={44} />
</SimpleTable.Head>
<tbody>
{isLoading &&
Expand All @@ -54,6 +55,7 @@ export function WithLoader() {
<SimpleTable.Td $isLoading />
<SimpleTable.Td $isLoading />
<SimpleTable.Td $isLoading />
<SimpleTable.Td $isLoading />
</SimpleTable.BodyTr>
))}
{!isLoading &&
Expand All @@ -62,6 +64,9 @@ export function WithLoader() {
<SimpleTable.Td>{brewery.id}</SimpleTable.Td>
<SimpleTable.Td>{brewery.name}</SimpleTable.Td>
<SimpleTable.Td>{`${brewery.street}, ${brewery.city} ${brewery.postalCode}, ${brewery.state}`}</SimpleTable.Td>
<SimpleTable.Td>
<IconButton Icon={Icon.Check} size={Size.SMALL} />
</SimpleTable.Td>
</SimpleTable.BodyTr>
))}
</tbody>
Expand Down

0 comments on commit 176b161

Please sign in to comment.