Update darkTheme (#781)
* Update darkTheme * Add font color variation to IconButton
This commit is contained in:
@ -327,12 +327,25 @@ export type CommentThreadTargetOrderByRelationAggregateInput = {
|
||||
_count?: InputMaybe<SortOrder>;
|
||||
};
|
||||
|
||||
export type CommentThreadTargetScalarWhereInput = {
|
||||
AND?: InputMaybe<Array<CommentThreadTargetScalarWhereInput>>;
|
||||
NOT?: InputMaybe<Array<CommentThreadTargetScalarWhereInput>>;
|
||||
OR?: InputMaybe<Array<CommentThreadTargetScalarWhereInput>>;
|
||||
commentThreadId?: InputMaybe<StringFilter>;
|
||||
commentableId?: InputMaybe<StringFilter>;
|
||||
commentableType?: InputMaybe<EnumCommentableTypeFilter>;
|
||||
createdAt?: InputMaybe<DateTimeFilter>;
|
||||
id?: InputMaybe<StringFilter>;
|
||||
updatedAt?: InputMaybe<DateTimeFilter>;
|
||||
};
|
||||
|
||||
export type CommentThreadTargetUpdateManyWithoutCommentThreadNestedInput = {
|
||||
connect?: InputMaybe<Array<CommentThreadTargetWhereUniqueInput>>;
|
||||
connectOrCreate?: InputMaybe<Array<CommentThreadTargetCreateOrConnectWithoutCommentThreadInput>>;
|
||||
create?: InputMaybe<Array<CommentThreadTargetCreateWithoutCommentThreadInput>>;
|
||||
createMany?: InputMaybe<CommentThreadTargetCreateManyCommentThreadInputEnvelope>;
|
||||
delete?: InputMaybe<Array<CommentThreadTargetWhereUniqueInput>>;
|
||||
deleteMany?: InputMaybe<Array<CommentThreadTargetScalarWhereInput>>;
|
||||
disconnect?: InputMaybe<Array<CommentThreadTargetWhereUniqueInput>>;
|
||||
set?: InputMaybe<Array<CommentThreadTargetWhereUniqueInput>>;
|
||||
};
|
||||
|
||||
@ -5,13 +5,18 @@ export type IconButtonVariant = 'transparent' | 'border' | 'shadow' | 'white';
|
||||
|
||||
export type IconButtonSize = 'large' | 'medium' | 'small';
|
||||
|
||||
export type IconButtonFontColor = 'primary' | 'secondary' | 'tertiary';
|
||||
|
||||
export type ButtonProps = {
|
||||
icon?: React.ReactNode;
|
||||
variant?: IconButtonVariant;
|
||||
size?: IconButtonSize;
|
||||
textColor?: IconButtonFontColor;
|
||||
} & React.ComponentProps<'button'>;
|
||||
|
||||
const StyledIconButton = styled.button<Pick<ButtonProps, 'variant' | 'size'>>`
|
||||
const StyledIconButton = styled.button<
|
||||
Pick<ButtonProps, 'variant' | 'size' | 'textColor'>
|
||||
>`
|
||||
align-items: center;
|
||||
background: ${({ theme, variant }) => {
|
||||
switch (variant) {
|
||||
@ -61,12 +66,12 @@ const StyledIconButton = styled.button<Pick<ButtonProps, 'variant' | 'size'>>`
|
||||
return 'none';
|
||||
}
|
||||
}};
|
||||
color: ${({ theme, disabled }) => {
|
||||
color: ${({ theme, disabled, textColor }) => {
|
||||
if (disabled) {
|
||||
return theme.font.color.extraLight;
|
||||
}
|
||||
|
||||
return theme.font.color.tertiary;
|
||||
return theme.font.color[textColor ?? 'secondary'];
|
||||
}};
|
||||
cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')};
|
||||
display: flex;
|
||||
@ -115,6 +120,7 @@ export function IconButton({
|
||||
title,
|
||||
variant = 'transparent',
|
||||
size = 'medium',
|
||||
textColor = 'tertiary',
|
||||
disabled = false,
|
||||
...props
|
||||
}: ButtonProps) {
|
||||
@ -123,6 +129,7 @@ export function IconButton({
|
||||
variant={variant}
|
||||
size={size}
|
||||
disabled={disabled}
|
||||
textColor={textColor}
|
||||
{...props}
|
||||
>
|
||||
{icon}
|
||||
|
||||
@ -8,7 +8,7 @@ import {
|
||||
} from 'framer-motion';
|
||||
|
||||
import { Checkmark } from '@/ui/checkmark/components/Checkmark';
|
||||
import DarkNoise from '@/ui/themes/assets/dark-noise.png';
|
||||
import DarkNoise from '@/ui/themes/assets/dark-noise.jpg';
|
||||
import LightNoise from '@/ui/themes/assets/light-noise.png';
|
||||
import { grayScale } from '@/ui/themes/colors';
|
||||
import { ColorScheme } from '~/generated/graphql';
|
||||
|
||||
@ -78,6 +78,7 @@ export function TopBar({
|
||||
icon={<IconPlus size={16} />}
|
||||
size="large"
|
||||
data-testid="add-button"
|
||||
textColor="secondary"
|
||||
onClick={onAddButtonClick}
|
||||
variant="border"
|
||||
/>
|
||||
|
||||
BIN
front/src/modules/ui/themes/assets/dark-noise.jpg
Normal file
BIN
front/src/modules/ui/themes/assets/dark-noise.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.5 KiB |
@ -1,4 +1,4 @@
|
||||
import DarkNoise from './assets/dark-noise.png';
|
||||
import DarkNoise from './assets/dark-noise.jpg';
|
||||
import LightNoise from './assets/light-noise.png';
|
||||
import { grayScale, rgba } from './colors';
|
||||
|
||||
@ -16,22 +16,22 @@ export const backgroundLight = {
|
||||
light: rgba(grayScale.gray100, 0.04),
|
||||
lighter: rgba(grayScale.gray100, 0.02),
|
||||
},
|
||||
overlay: rgba(grayScale.gray85, 0.8),
|
||||
overlay: rgba(grayScale.gray80, 0.8),
|
||||
};
|
||||
|
||||
export const backgroundDark = {
|
||||
noisy: `url(${DarkNoise.toString()});`,
|
||||
primary: grayScale.gray90,
|
||||
secondary: grayScale.gray85,
|
||||
tertiary: grayScale.gray80,
|
||||
quaternary: grayScale.gray75,
|
||||
primary: grayScale.gray85,
|
||||
secondary: grayScale.gray80,
|
||||
tertiary: grayScale.gray75,
|
||||
quaternary: grayScale.gray70,
|
||||
transparent: {
|
||||
primary: rgba(grayScale.gray90, 0.8),
|
||||
secondary: rgba(grayScale.gray85, 0.8),
|
||||
strong: rgba(grayScale.gray0, 0.09),
|
||||
medium: rgba(grayScale.gray0, 0.06),
|
||||
light: rgba(grayScale.gray0, 0.03),
|
||||
lighter: rgba(grayScale.gray0, 0.02),
|
||||
primary: rgba(grayScale.gray85, 0.8),
|
||||
secondary: rgba(grayScale.gray80, 0.8),
|
||||
strong: rgba(grayScale.gray0, 0.14),
|
||||
medium: rgba(grayScale.gray0, 0.1),
|
||||
light: rgba(grayScale.gray0, 0.06),
|
||||
lighter: rgba(grayScale.gray0, 0.03),
|
||||
},
|
||||
overlay: rgba(grayScale.gray85, 0.8),
|
||||
overlay: rgba(grayScale.gray80, 0.8),
|
||||
};
|
||||
|
||||
@ -22,11 +22,11 @@ export const borderLight = {
|
||||
|
||||
export const borderDark = {
|
||||
color: {
|
||||
strong: grayScale.gray65,
|
||||
medium: grayScale.gray70,
|
||||
light: grayScale.gray75,
|
||||
secondaryInverted: grayScale.gray40,
|
||||
inverted: grayScale.gray30,
|
||||
strong: grayScale.gray55,
|
||||
medium: grayScale.gray65,
|
||||
light: grayScale.gray70,
|
||||
secondaryInverted: grayScale.gray35,
|
||||
inverted: grayScale.gray20,
|
||||
},
|
||||
...common,
|
||||
};
|
||||
|
||||
@ -2,7 +2,6 @@ import hexRgb from 'hex-rgb';
|
||||
|
||||
export const grayScale = {
|
||||
gray100: '#000000',
|
||||
gray95: '#0f0f0f',
|
||||
gray90: '#141414',
|
||||
gray85: '#171717',
|
||||
gray80: '#1b1b1b',
|
||||
@ -18,7 +17,7 @@ export const grayScale = {
|
||||
gray30: '#cccccc',
|
||||
gray25: '#d6d6d6',
|
||||
gray20: '#ebebeb',
|
||||
gray15: '#f5f5f5',
|
||||
gray15: '#f1f1f1',
|
||||
gray10: '#fcfcfc',
|
||||
gray0: '#ffffff',
|
||||
};
|
||||
|
||||
@ -32,11 +32,11 @@ export const fontLight = {
|
||||
|
||||
export const fontDark = {
|
||||
color: {
|
||||
primary: grayScale.gray30,
|
||||
secondary: grayScale.gray40,
|
||||
tertiary: grayScale.gray50,
|
||||
light: grayScale.gray55,
|
||||
extraLight: grayScale.gray60,
|
||||
primary: grayScale.gray20,
|
||||
secondary: grayScale.gray35,
|
||||
tertiary: grayScale.gray45,
|
||||
light: grayScale.gray50,
|
||||
extraLight: grayScale.gray55,
|
||||
inverted: grayScale.gray100,
|
||||
},
|
||||
...common,
|
||||
|
||||
@ -28,7 +28,7 @@ generator nestgraphql {
|
||||
|
||||
// CommentThread: Only Allow targets createOrConnect / createMany
|
||||
decorate_commentThreadTargets_type = "*CommentThreadTarget*Input"
|
||||
decorate_commentThreadTargets_field = "*(update|upsert|updateMany|deleteMany)"
|
||||
decorate_commentThreadTargets_field = "*(update|upsert|updateMany)"
|
||||
decorate_commentThreadTargets_name = "HideField"
|
||||
decorate_commentThreadTargets_from = "@nestjs/graphql"
|
||||
decorate_commentThreadTargets_arguments = "[]"
|
||||
|
||||
Reference in New Issue
Block a user