Skip to content

Commit

Permalink
chore(platform): update style
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed Jun 2, 2023
1 parent 2fe0df5 commit c3ed034
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions packages/platform/src/app/components/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@ export interface AppTableProps<T> {
};
aExpand?: (data: T, index: number) => React.ReactNode;
aScroll?: { x?: number | string; y?: number | string };
aLabelWidth?: string | number;
aKey?: (data: T, index: number) => any;
}

export function AppTable<T = any>(props: AppTableProps<T>): JSX.Element | null {
const { className, aName, aData, aColumns, aActions, aExpand, aScroll, aLabelWidth, aKey = (data) => data['id'] } = props;
const { className, aName, aData, aColumns, aActions, aExpand, aScroll, aKey = (data) => data['id'] } = props;

const columns = aColumns.filter((column) => !column.hidden);
const titleIndex = columns.findIndex((column) => column.title);
Expand Down Expand Up @@ -291,8 +290,7 @@ export function AppTable<T = any>(props: AppTableProps<T>): JSX.Element | null {
<AppDetailView
aCol={12}
aGutter={3}
aLabelAlign="right"
aLabelWidth={aLabelWidth}
aVertical
aList={columns
.filter((column, indexOfCol) => !column.checkbox && indexOfCol !== titleIndex)
.map((column) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ const StandardTable = AppRoute(() => {
width: 140,
}}
aScroll={{ x: 1200 }}
aLabelWidth={72}
/>
<div className="app-table-footer">
<div>
Expand Down
3 changes: 2 additions & 1 deletion packages/platform/src/styles/components/detail-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

@include e(item-label) {
margin-right: 0;
margin-bottom: 8px;
margin-bottom: 2px;
font-size: 0.775em;

&::after {
content: none;
Expand Down

0 comments on commit c3ed034

Please sign in to comment.