Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dvt select type design #52

Merged
merged 7 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
completed
  • Loading branch information
Muhammed-baban committed Dec 5, 2023
commit 7c6e8266473be517218e41c27f95daa46fc9bfd6
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ interface StyledSelectOptionProps {
typeDesign: string;
}

const StyledSelect = styled.div`
const StyledSelect = styled.div<StyledSelectLabelProps>`
position: relative;
display: inline-flex;
flex-direction: column;
gap: ${({ typeDesign }) => (typeDesign === 'form' ? '12px' : '3px')};
`;

const StyledSelectSelect = styled.div<StyledSelectProps>`
Expand All @@ -72,8 +73,6 @@ const StyledSelectSelect = styled.div<StyledSelectProps>`
: theme.colors.dvt.grayscale.light2};
border: none;
appearance: none;
margin-bottom: ${({ typeDesign }) =>
typeDesign === 'form' ? '12px' : '3px'};
cursor: pointer;
color: ${({ theme }) => theme.colors.dvt.primary.light1};
transition: background-color 0.3s ease-in-out;
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/components/DvtSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const DvtSelect: React.FC<DvtSelectProps> = ({
};

return (
<StyledSelect ref={ref}>
<StyledSelect ref={ref} typeDesign={typeDesign}>
{label && (
<StyledSelectLabel typeDesign={typeDesign}>{label}</StyledSelectLabel>
)}
Expand Down
Loading