Fix margin on DeleteModal overlay (#998)
* Fix margin on DeleteModal overlay * Update chromatic ci triggers * Update chromatic ci triggers
This commit is contained in:
@ -57,6 +57,10 @@ const RowContainer = styled.div`
|
||||
`;
|
||||
|
||||
export const ElementContainer = styled.div`
|
||||
display: flex;
|
||||
`;
|
||||
|
||||
export const CellContainer = styled.div`
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -70,13 +74,15 @@ const emptyVariable = {
|
||||
};
|
||||
|
||||
export const CatalogDecorator: Decorator = (Story, context) => {
|
||||
const { catalog } = context.parameters;
|
||||
const {
|
||||
catalog: { dimensions, options },
|
||||
} = context.parameters;
|
||||
const [
|
||||
variable1,
|
||||
variable2 = emptyVariable,
|
||||
variable3 = emptyVariable,
|
||||
variable4 = emptyVariable,
|
||||
] = catalog;
|
||||
] = dimensions;
|
||||
|
||||
return (
|
||||
<StyledContainer>
|
||||
@ -96,22 +102,25 @@ export const CatalogDecorator: Decorator = (Story, context) => {
|
||||
<RowTitle>{variable2.labels?.(value2) || value2}</RowTitle>
|
||||
)}
|
||||
{variable1.values.map((value1: string) => (
|
||||
<ElementContainer key={value1} id={value1}>
|
||||
<CellContainer key={value1} id={value1}>
|
||||
{(variable1.labels?.(value1) || value1) && (
|
||||
<ElementTitle>
|
||||
{variable1.labels?.(value1) || value1}
|
||||
</ElementTitle>
|
||||
)}
|
||||
<Story
|
||||
args={{
|
||||
...context.args,
|
||||
...variable1.props(value1),
|
||||
...variable2.props(value2),
|
||||
...variable3.props(value3),
|
||||
...variable4.props(value4),
|
||||
}}
|
||||
/>
|
||||
</ElementContainer>
|
||||
|
||||
<ElementContainer {...options?.elementContainer}>
|
||||
<Story
|
||||
args={{
|
||||
...context.args,
|
||||
...variable1.props(value1),
|
||||
...variable2.props(value2),
|
||||
...variable3.props(value3),
|
||||
...variable4.props(value4),
|
||||
}}
|
||||
/>
|
||||
</ElementContainer>
|
||||
</CellContainer>
|
||||
))}
|
||||
</RowContainer>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user