Skip to content

Commit eae1ec3

Browse files
committed
Add missing class to text cells
1 parent d9a7207 commit eae1ec3

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

packages/react-storage/src/components/StorageBrowser/Views/LocationsView/Controls/DataTable.tsx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@ import { capitalize } from '@aws-amplify/ui';
55
import {
66
DataTable,
77
TABLE_DATA_BUTTON_CLASS,
8+
TABLE_DATA_TEXT_CLASS_NAME,
89
TABLE_HEADER_BUTTON_CLASS_NAME,
910
TABLE_HEADER_CLASS_NAME,
1011
} from '../../../components/DataTable';
1112
import { useControl } from '../../../context/controls';
1213
import { useLocationsData } from '../../../context/actions';
1314
import { LocationAccess } from '../../../context/types';
1415
import { compareStrings } from '../../../context/controls/Table';
15-
import { ButtonElement, IconElement } from '../../../context/elements';
16+
import {
17+
ButtonElement,
18+
IconElement,
19+
SpanElement,
20+
} from '../../../context/elements';
1621

1722
export type SortDirection = 'ascending' | 'descending' | 'none';
1823

@@ -113,8 +118,22 @@ const getLocationsData = ({
113118
</ButtonElement>
114119
),
115120
},
116-
{ key: `td-type-${index}`, children: location.type },
117-
{ key: `td-permission-${index}`, children: location.permission },
121+
{
122+
key: `td-type-${index}`,
123+
children: (
124+
<SpanElement className={TABLE_DATA_TEXT_CLASS_NAME}>
125+
{location.type}
126+
</SpanElement>
127+
),
128+
},
129+
{
130+
key: `td-permission-${index}`,
131+
children: (
132+
<SpanElement className={TABLE_DATA_TEXT_CLASS_NAME}>
133+
{location.permission}
134+
</SpanElement>
135+
),
136+
},
118137
]);
119138

120139
return { columns, rows };

packages/react-storage/src/components/StorageBrowser/components/DataTable.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const TABLE_HEADER_CLASS_NAME = `${TABLE_CLASS_NAME}__header`;
1616
export const TABLE_HEADER_BUTTON_CLASS_NAME = `${TABLE_CLASS_NAME}__header__button`;
1717
export const TABLE_ROW_CLASS_NAME = `${TABLE_CLASS_NAME}__row`;
1818
export const TABLE_DATA_CLASS_NAME = `${TABLE_CLASS_NAME}__data`;
19+
export const TABLE_DATA_TEXT_CLASS_NAME = `${TABLE_CLASS_NAME}__data__text`;
1920
export const TABLE_DATA_BUTTON_CLASS = `${TABLE_CLASS_NAME}__data__button`;
2021

2122
export interface ColumnHeaderItemProps

packages/react-storage/src/components/StorageBrowser/context/elements/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export {
44
ButtonElementProps,
55
MessageVariant,
66
PaginateVariant,
7+
SpanElement,
78
StorageBrowserElements,
89
TableBodyElement,
910
TableDataElement,

0 commit comments

Comments
 (0)