Skip to content

Commit

Permalink
Feat(web): Switch PartnerLogo component to v3 design tokens #DS-1450
Browse files Browse the repository at this point in the history
  • Loading branch information
crishpeen committed Aug 29, 2024
1 parent 6da6c02 commit d09232c
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 211 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
@use 'theme' as theme;
@use 'tools';
@use '../../settings/globals';
@use '../../tools/dictionaries';

.UNSTABLE_PartnerLogo {
display: inline-block;
max-width: 100%;
height: fit-content;
padding: var(--#{globals.$prefix}partner-logo-padding);
border-radius: theme.$border-radius;
background: theme.$background-color;
}

.UNSTABLE_PartnerLogo > img,
.UNSTABLE_PartnerLogo > svg {
width: fit-content;
height: var(--#{globals.$prefix}partner-logo-image-height);
}

@include tools.generate-logo-sizes('UNSTABLE_PartnerLogo', theme.$sizes);
@include dictionaries.generate-sizes($class-name: 'UNSTABLE_PartnerLogo', $sizes: theme.$sizes);

.UNSTABLE_PartnerLogo--hasSafeAreaDisabled {
padding: 0;
--#{globals.$prefix}partner-logo-padding: 0;
}
19 changes: 10 additions & 9 deletions packages/web/src/scss/components/UNSTABLE_PartnerLogo/_theme.scss
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
@use '@tokens' as tokens;
@use '@global' as global-tokens;
@use '../../settings/globals';

$background-color: tokens.$background-basic;
$border-radius: tokens.$space-300;
$background-color: var(--#{globals.$prefix}color-background-primary);
$border-radius: global-tokens.$radius-200;
$sizes: (
small: (
height: tokens.$space-800,
padding: tokens.$space-400,
image-height: 32px,
padding: global-tokens.$space-500,
),
medium: (
height: tokens.$space-1000,
padding: tokens.$space-400,
image-height: 48px,
padding: global-tokens.$space-500,
),
large: (
height: 60px,
padding: tokens.$space-500,
image-height: 60px,
padding: global-tokens.$space-600,
),
);
19 changes: 0 additions & 19 deletions packages/web/src/scss/components/UNSTABLE_PartnerLogo/_tools.scss

This file was deleted.

2 changes: 1 addition & 1 deletion packages/web/src/scss/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

// @forward 'UNSTABLE_Avatar';
@forward 'UNSTABLE_EmptyState';
@forward 'UNSTABLE_PartnerLogo';

// @forward 'UNSTABLE_PartnerLogo';
// @forward 'UNSTABLE_ProductLogo';
@forward 'UNSTABLE_Section';

Expand Down
Loading

0 comments on commit d09232c

Please sign in to comment.