Skip to content

Commit

Permalink
fix(tag): styles and theme fixes (#220)
Browse files Browse the repository at this point in the history
Co-authored-by: Thrasos Kafasis <[email protected]>
  • Loading branch information
ThrasyvoulosKafasis and Thrasos Kafasis authored Sep 25, 2023
1 parent 210888f commit 8b095b5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Tag/__snapshots__/Tag.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`<Tag /> matches snapshot 1`] = `
<div>
<span
class="tag css-r7er4p-tag-tag"
class="tag css-xorq2n-tag-tag"
id="tag-1"
style="background-color: purple; color: white;"
>
Expand Down
7 changes: 5 additions & 2 deletions src/components/Tag/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import { css, Theme, SerializedStyles } from "@emotion/react";
export const tag = ({ typeScaleSizes, tag }: Theme): SerializedStyles => css`
display: inline-flex;
align-items: center;
font-size: ${typeScaleSizes.xs};
padding: 0.5rem 0.75rem 0.4rem;
font-size: ${typeScaleSizes.sm};
line-height: normal;
padding: 0.5rem;
background-color: ${tag.backgroundColor};
color: ${tag.color};
border-radius: 5px;
white-space: nowrap;
`;
5 changes: 3 additions & 2 deletions src/theme/default/config/tag.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Color from "color";
import { colors } from "../colors";

export default {
backgroundColor: colors.primary.lightest,
color: colors.white,
backgroundColor: Color(colors.primary.lightest).alpha(0.25).string(),
color: colors.primary.base,
};

0 comments on commit 8b095b5

Please sign in to comment.