mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-05-07 09:12:34 +00:00
Refactor node packages to yarn workspaces & ditch next.js for CRA. (#161)
* chore: restructure project into yarn workspaces, remove next * fix tests, remove webapp from terraform * remove more ui deployment bits * remove pages, fix FUNDING.yml * remove isomorphism * remove next providers * fix linting issues * feat: start basis of new web ui system on CRA * chore: move types to @roleypoly/types package * chore: move src/common/utils to @roleypoly/misc-utils * chore: remove roleypoly/ path remappers * chore: renmove vercel config * chore: re-add worker-types to api package * chore: fix type linting scope for api * fix(web): craco should include all of packages dir * fix(ci): change api webpack path for wrangler * chore: remove GAR actions from CI * chore: update codeql job * chore: test better github dar matcher in lint-staged
This commit is contained in:
parent
49e308507e
commit
2ff6588030
328 changed files with 16624 additions and 3525 deletions
44
packages/design-system/atoms/avatar/Avatar.styled.ts
Normal file
44
packages/design-system/atoms/avatar/Avatar.styled.ts
Normal file
|
@ -0,0 +1,44 @@
|
|||
import { palette } from '@roleypoly/design-system/atoms/colors';
|
||||
import styled, { css } from 'styled-components';
|
||||
import { AvatarProps } from './Avatar';
|
||||
|
||||
type ContainerProps = Pick<AvatarProps, 'size'> & Pick<AvatarProps, 'deliberatelyEmpty'>;
|
||||
export const Container = styled.div<ContainerProps>`
|
||||
border-radius: 100%;
|
||||
box-sizing: border-box;
|
||||
width: ${(props: ContainerProps) => props.size || 48}px;
|
||||
height: ${(props: ContainerProps) => props.size || 48}px;
|
||||
min-width: ${(props: ContainerProps) => props.size || 48}px;
|
||||
min-height: ${(props: ContainerProps) => props.size || 48}px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: ${palette.grey100};
|
||||
position: relative;
|
||||
background-color: ${palette.grey500};
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
overflow: hidden;
|
||||
font-size: ${(props: ContainerProps) => props.size};
|
||||
${(props) =>
|
||||
props.deliberatelyEmpty &&
|
||||
css`
|
||||
border: 4px solid rgba(0, 0, 0, 0.25);
|
||||
background-color: ${palette.taupe400};
|
||||
color: ${palette.taupe600};
|
||||
`}
|
||||
`;
|
||||
|
||||
type ImageProps = Pick<AvatarProps, 'src'>;
|
||||
export const Image = styled.div<ImageProps>`
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50% 50%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
border-radius: 100%;
|
||||
`;
|
Loading…
Add table
Add a link
Reference in a new issue