mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-18 10:29:08 +00:00
chore: restructure project into yarn workspaces, remove next
This commit is contained in:
parent
49e308507e
commit
8d06327c03
266 changed files with 16466 additions and 3350 deletions
|
@ -0,0 +1,39 @@
|
|||
import { numberToChroma, palette } from '@roleypoly/design-system/atoms/colors';
|
||||
import styled, { css } from 'styled-components';
|
||||
import { Role } from '../../../../src/common/types';
|
||||
|
||||
export const DiscordBase = styled.div`
|
||||
background-color: ${palette.discord100};
|
||||
border: solid 1px rgba(0, 0, 0, 0.15);
|
||||
border-radius: 3px;
|
||||
padding: 10px;
|
||||
user-select: none;
|
||||
width: 250px;
|
||||
`;
|
||||
|
||||
const hover = (roleColor: string) => css`
|
||||
color: #efefef;
|
||||
background-color: ${roleColor};
|
||||
cursor: pointer;
|
||||
`;
|
||||
|
||||
export const DiscordRole = styled.div<{
|
||||
discordRole: Role;
|
||||
isRoleypoly: boolean;
|
||||
}>`
|
||||
/* stylelint-disable function-name-case, function-whitespace-after */
|
||||
|
||||
/* Disabled due to postcss bug parsing the below functions as CSS and not a JS interpolation */
|
||||
|
||||
padding: 6px 10px;
|
||||
color: ${(props) => numberToChroma(props.discordRole.color).css()};
|
||||
border-radius: 3px;
|
||||
|
||||
:hover {
|
||||
${(props) => hover(numberToChroma(props.discordRole.color).alpha(0.5).css())}
|
||||
}
|
||||
|
||||
${(props) =>
|
||||
props.isRoleypoly &&
|
||||
hover(numberToChroma(props.discordRole.color).alpha(0.5).css())}
|
||||
`;
|
Loading…
Add table
Add a link
Reference in a new issue