Skip to content

Commit

Permalink
address comments 2
Browse files Browse the repository at this point in the history
  • Loading branch information
dliu27 committed Dec 3, 2024
1 parent 4de4c36 commit 074b102
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as React from 'react';
import styled from 'styled-components';

import {Box} from './Box';
import {Colors} from './Color';
Expand Down Expand Up @@ -27,11 +28,10 @@ export const NonIdealState = ({
const singleContentElement = [title, description, action].filter(Boolean).length === 1;

return (
<Box
<NonIdealStateWrapper
flex={{gap: 20, alignItems: singleContentElement ? 'center' : 'flex-start'}}
background={Colors.backgroundLight()}
padding={24}
className="non-ideal-state-parent-box"
style={{
margin: 'auto',
borderRadius: 8,
Expand Down Expand Up @@ -59,6 +59,8 @@ export const NonIdealState = ({
{description && <div style={{color: Colors.textDefault()}}>{description}</div>}
{action}
</Box>
</Box>
</NonIdealStateWrapper>
);
};

export const NonIdealStateWrapper = styled(Box)``;
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Group,
Icon,
NonIdealState,
NonIdealStateWrapper,
Spinner,
Subheading,
Tag,
Expand Down Expand Up @@ -529,7 +530,7 @@ const ComputedCursorGrid = styled.div`
`;

const SkipReasonNonIdealStateWrapper = styled.div`
.non-ideal-state-parent-box {
${NonIdealStateWrapper} {
margin: auto !important;
width: unset !important;
max-width: unset !important;
Expand Down

0 comments on commit 074b102

Please sign in to comment.