Skip to content

Commit

Permalink
[CP-3146] Badge pixel perfect
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarski committed Oct 3, 2024
1 parent 130f2b1 commit b17bd59
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,10 @@ const view: View = {
extra: {
tooltip: {
contentText: "Select",
offset: {
y: 0,
x: 10
}
},
},
},
Expand Down Expand Up @@ -619,6 +623,23 @@ const view: View = {
phoneDropdownCounterBadge: {
component: "badge",
childrenKeys: ["phoneDropdownCounterBadgeText"],
dataProvider: {
source: "entities-field",
entitiesType: "contacts",
fields: [
{
componentField: "extra-data.tooltip.contentList",
providerField: "phoneNumbers",
slice: [1],
flat: "phoneNumber",
},
],
},
extra: {
tooltip: {
placement: "bottom-left",
},
},
},
phoneDropdownCounterBadgeText: {
component: "format-message",
Expand All @@ -632,22 +653,11 @@ const view: View = {
modifier: "length",
slice: [1],
},
{
componentField: "extra-data.tooltip.contentList",
providerField: "phoneNumbers",
slice: [1],
flat: "phoneNumber",
},
],
},
config: {
messageTemplate: "+{phoneNumbersLength}",
},
extra: {
tooltip: {
placement: "bottom-left",
},
},
},
detailsWrapper: {
component: "form.conditionalRenderer",
Expand Down
1 change: 1 addition & 0 deletions libs/generic-view/ui/src/lib/data-rows/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const Badge: APIFC<BadgeData> = ({
const BadgeWrapper = styled(Tag)<{ variant: BadgeData["variant"] }>`
height: 2.2rem;
line-height: 2.2rem;
letter-spacing: 0.04em;
${({ variant, theme }) =>
variant === "dark" &&
Expand Down

0 comments on commit b17bd59

Please sign in to comment.