Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
add top padding to tag
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswhong committed Aug 8, 2023
1 parent d6e79f9 commit 409ffd6
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ exports[`navigation-accordion Titles with tags renders as expected 1`] = `
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ exports[`overview-header Beta product renders as expected 1`] = `
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Array [
id="dr-ui--page-layout-sidebar"
style={
Object {
"top": "84px",
"top": 88,
}
}
>
Expand Down Expand Up @@ -883,7 +883,7 @@ Array [
id="dr-ui--page-layout-sidebar"
style={
Object {
"top": "84px",
"top": 88,
}
}
>
Expand Down Expand Up @@ -1919,7 +1919,7 @@ Array [
id="dr-ui--page-layout-sidebar"
style={
Object {
"top": "84px",
"top": 88,
}
}
>
Expand Down Expand Up @@ -2804,7 +2804,7 @@ Array [
id="dr-ui--page-layout-sidebar"
style={
Object {
"top": "84px",
"top": 88,
}
}
>
Expand Down Expand Up @@ -3623,7 +3623,7 @@ Array [
id="dr-ui--page-layout-sidebar"
style={
Object {
"top": "84px",
"top": 88,
}
}
>
Expand Down Expand Up @@ -3651,6 +3651,7 @@ Array [
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ exports[`product-menu Beta product renders as expected 1`] = `
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand Down Expand Up @@ -66,6 +67,7 @@ exports[`product-menu Beta product renders as expected 2`] = `
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand Down
8 changes: 7 additions & 1 deletion src/components/tag/__tests__/__snapshots__/tag.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exports[`tag Beta tag renders as expected 1`] = `
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand All @@ -30,7 +31,11 @@ exports[`tag Custom tag renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
LIMITED ACCESS
</div>
Expand All @@ -49,6 +54,7 @@ exports[`tag small variant renders as expected 1`] = `
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand Down
3 changes: 2 additions & 1 deletion src/components/tag/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export default class Tag extends React.PureComponent {
<Tooltip content={theme.tooltipText} maxWidth="small" placement="top">
<div
style={{
...theme.styles
...theme.styles,
paddingTop: 1
}}
className={classnames(
`round inline-block cursor-default txt-fancy-medium color-gray-dark`,
Expand Down
76 changes: 64 additions & 12 deletions src/components/themes/__tests__/__snapshots__/themes.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ exports[`themes Custom tag renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
Limited access
</div>
Expand All @@ -24,7 +28,11 @@ exports[`themes Custom tag renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
Limited access
</div>
Expand All @@ -37,7 +45,11 @@ exports[`themes Custom tag renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -84,7 +96,11 @@ exports[`themes Custom tag renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -268,6 +284,7 @@ exports[`themes beta renders as expected 1`] = `
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand All @@ -285,6 +302,7 @@ exports[`themes beta renders as expected 1`] = `
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand All @@ -302,6 +320,7 @@ exports[`themes beta renders as expected 1`] = `
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand Down Expand Up @@ -353,6 +372,7 @@ exports[`themes beta renders as expected 1`] = `
style={
Object {
"backgroundColor": "#CBE4FF",
"paddingTop": 1,
}
}
>
Expand Down Expand Up @@ -538,7 +558,11 @@ exports[`themes fundamentals renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
FUNDAMENTALS
</div>
Expand All @@ -551,7 +575,11 @@ exports[`themes fundamentals renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
FUNDAMENTALS
</div>
Expand All @@ -564,7 +592,11 @@ exports[`themes fundamentals renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -611,7 +643,11 @@ exports[`themes fundamentals renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -726,7 +762,11 @@ exports[`themes legacy or warning renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
LEGACY
</div>
Expand All @@ -739,7 +779,11 @@ exports[`themes legacy or warning renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
LEGACY
</div>
Expand All @@ -752,7 +796,11 @@ exports[`themes legacy or warning renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
<svg
aria-hidden="true"
Expand Down Expand Up @@ -799,7 +847,11 @@ exports[`themes legacy or warning renders as expected 1`] = `
onPointerDown={[Function]}
onPointerLeave={[Function]}
onPointerMove={[Function]}
style={Object {}}
style={
Object {
"paddingTop": 1,
}
}
>
<svg
aria-hidden="true"
Expand Down

0 comments on commit 409ffd6

Please sign in to comment.