Skip to content

Commit

Permalink
reorganize styles
Browse files Browse the repository at this point in the history
  • Loading branch information
juliajforesti committed Dec 27, 2023
1 parent 8562062 commit 9a9b2df
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 35 deletions.
2 changes: 1 addition & 1 deletion packages/fuselage/src/components/Card/Card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const Horizontal: ComponentStory<typeof Card> = () => (
);

export const Clickable: ComponentStory<typeof Card> = () => (
<Card horizontal>
<Card horizontal clickable>
<CardRow>
<FramedIcon icon='document-eye' info />
<CardCol>
Expand Down
56 changes: 22 additions & 34 deletions packages/fuselage/src/components/Card/Card.styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,39 +39,37 @@ $card-hero-padding: lengths.padding(28);
gap: $card-spacing;
}

&__controls {
align-items: center;
&__col {
display: flex;
flex-direction: column;
}
}

// Card horizontal
.rcx-card__horizontal {
align-items: center;
&__row {
flex-grow: 1;
flex-shrink: 1;
}

padding: $card-horizontal-padding;
gap: $card-horizontal-gap;
&__horizontal {
align-items: center;

.rcx-card__controls {
justify-content: flex-end;
flex-shrink: 0;
}
padding: $card-horizontal-padding;
gap: $card-horizontal-gap;

&--wrap {
flex-wrap: wrap;
&--wrap {
flex-wrap: wrap;
}
}
}

// Card vertical
.rcx-card__vertical {
flex-direction: column;
&__vertical {
flex-direction: column;

padding: $card-vertical-padding;
gap: $card-vertical-gap;
}
padding: $card-vertical-padding;
gap: $card-vertical-gap;
}

// Card hero
.rcx-card__hero {
padding: $card-hero-padding;
&__hero {
padding: $card-hero-padding;
}
}

.rcx-card__title,
Expand All @@ -81,13 +79,3 @@ $card-hero-padding: lengths.padding(28);
display: flex;
align-items: center;
}

.rcx-card__col {
display: flex;
flex-direction: column;
}

.rcx-card__row {
// flex-grow: 1;
// flex-shrink: 1;
}

0 comments on commit 9a9b2df

Please sign in to comment.