Skip to content

Commit

Permalink
fix: fixed some issues at feat/dvt-list
Browse files Browse the repository at this point in the history
  • Loading branch information
uBaranT committed Dec 5, 2023
1 parent 5a6e72d commit 262cc15
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
14 changes: 10 additions & 4 deletions superset-frontend/src/components/DvtList/dvt-list.module.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const StyledDvtList = styled.div`
display: flex;
flex-direction: column;
gap: 11px;
border-radius: 12px;
background-color: ${({ theme }) => theme.colors.dvt.grayscale.light2};
height: 734px;
`;
Expand All @@ -31,6 +32,7 @@ const StyledDvtListLabel = styled.div`
letter-spacing: 0.2px;
font-weight: bold;
font-size: 12px;
padding-top: 10px;
line-height: 14.63px;
color: ${({ theme }) => theme.colors.grayscale.dark2};
`;
Expand All @@ -39,20 +41,24 @@ const StyledDvtListScroll = styled.div`
display: flex;
overflow-y: auto;
flex-direction: column;

Check failure on line 44 in superset-frontend/src/components/DvtList/dvt-list.module.tsx

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `··`

Check failure on line 44 in superset-frontend/src/components/DvtList/dvt-list.module.tsx

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `··`
&::-webkit-scrollbar {
background-color: ${({ theme }) => theme.colors.dvt.primary.light2};
width: 10px;
background-color: ${({ theme }) => theme.colors.dvt.grayscale.light1};
width: 6px;
border-radius: 12px;

Check failure on line 48 in superset-frontend/src/components/DvtList/dvt-list.module.tsx

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `⏎`

Check failure on line 48 in superset-frontend/src/components/DvtList/dvt-list.module.tsx

View workflow job for this annotation

GitHub Actions / frontend-build

Delete `⏎`
}
&::-webkit-scrollbar-thumb {
background-color: ${({ theme }) => theme.colors.dvt.primary.base};
background-color: ${({ theme }) => theme.colors.dvt.grayscale.base};
width: 4px;
border-radius: 12px;
}
`;

const StyledDvtListItem = styled.div`
display: flex;
justify-content: space-between;
margin-right: 8px;
`;

export {
Expand Down
7 changes: 5 additions & 2 deletions superset-frontend/src/components/DvtList/dvt-list.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import { Meta } from '@storybook/react';
import DvtList, { DvtListProps } from '.';

export default {
title: 'DvtComponents/Dvt-List',
title: 'Dvt-Components/Dvt-List',
component: DvtList,
} as Meta;

export const Default = (args: DvtListProps) => (
<div style={{ width: '250px' }}>
<div style={{ width: '250px', backgroundColor: '#B8C1CC', padding:'20px' }}>

Check failure on line 29 in superset-frontend/src/components/DvtList/dvt-list.stories.tsx

View workflow job for this annotation

GitHub Actions / frontend-build

Insert `·`

Check failure on line 29 in superset-frontend/src/components/DvtList/dvt-list.stories.tsx

View workflow job for this annotation

GitHub Actions / frontend-build

Insert `·`
<DvtList {...args} />
</div>
);
Expand Down Expand Up @@ -55,5 +55,8 @@ Default.args = {
{ id: 20, title: 'table_schema_subtitle', subtitle: 'string' },
{ id: 21, title: 'table_schema_subtitle', subtitle: 'string' },
{ id: 22, title: 'table_schema_subtitle', subtitle: 'string' },
{ id: 23, title: 'table_schema_subtitle', subtitle: 'string' },
{ id: 24, title: 'table_schema_subtitle', subtitle: 'string' },
{ id: 25, title: 'table_schema_subtitle', subtitle: 'string' },
],
};
16 changes: 9 additions & 7 deletions superset-frontend/src/components/DvtList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ import {
StyledDvtListScroll,
} from './dvt-list.module';

export interface DataProps {
id: number;
title: string;
subtitle: string;
}
export interface DvtListProps {
data: {
id: number;
title: string;
subtitle: string;
}[];
title: string;
data: DataProps[];
}

const DvtList: React.FC<DvtListProps> = ({ data }) => (
const DvtList: React.FC<DvtListProps> = ({ data, title }) => (
<StyledDvtList>
<StyledDvtListLabel>List Component</StyledDvtListLabel>
<StyledDvtListLabel>{title}</StyledDvtListLabel>
<StyledDvtListScroll>
{data.map(item => (
<StyledDvtListItem>
Expand Down

0 comments on commit 262cc15

Please sign in to comment.