Skip to content

Commit

Permalink
feat #147, #148 - Update background colors and avatar styles (#149)
Browse files Browse the repository at this point in the history
* feat #147 - Update background colors

Closes #147

* feat #148 - Update avatar styles

Closes #148
  • Loading branch information
nancy-dassana authored Nov 20, 2020
1 parent fc078b6 commit 6b3946d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dassana-io/web-components",
"version": "0.7.0",
"version": "0.7.1",
"publishConfig": {
"registry": "https://npm.pkg.github.com/dassana-io"
},
Expand Down
29 changes: 24 additions & 5 deletions src/components/Avatar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
import 'antd/lib/avatar/style/index.css'
import { Avatar as AntDAvatar } from 'antd'
import { AvatarProps as AntDAvatarProps } from 'antd/lib/avatar'
import { createUseStyles } from 'react-jss'
import { styleguide } from 'components/assets/styles'
import React, { FC, ReactNode } from 'react'

const {
colors: { blacks }
} = styleguide

const useStyles = createUseStyles({
'@global': {
'.ant-avatar': {
background: blacks['lighten-30'],
color: blacks['lighten-80']
}
}
})

interface SharedAvatarProps {
/**
* Letter type unit distance between left and right sides.
Expand Down Expand Up @@ -37,8 +52,12 @@ export const Avatar: FC<AvatarProps> = ({
gap,
icon,
size
}: AvatarProps) => (
<AntDAvatar gap={gap} icon={icon} size={size}>
{children}
</AntDAvatar>
)
}: AvatarProps) => {
useStyles()

return (
<AntDAvatar gap={gap} icon={icon} size={size}>
{children}
</AntDAvatar>
)
}
8 changes: 4 additions & 4 deletions src/components/assets/styles/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export interface Theme {

const lightPalette: Theme = {
background: {
primary: whites.base,
secondary: grays.base
primary: grays['lighten-70'],
secondary: whites.base
},
border: blacks['lighten-80'],
primary: blacks.base,
Expand All @@ -62,8 +62,8 @@ const lightPalette: Theme = {

const darkPalette: Theme = {
background: {
primary: blacks.base,
secondary: blacks['darken-20']
primary: blacks['darken-40'],
secondary: blacks.base
},
border: blacks['lighten-20'],
primary: blacks['lighten-50'],
Expand Down

0 comments on commit 6b3946d

Please sign in to comment.