Skip to content

Commit 5e4efad

Browse files
committed
Increase face overlap of banner, and add theme which does not overlap faces at all
1 parent bace24f commit 5e4efad

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

src/frontend/src/components/form.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070
.fixed-column {
7171
display: inline-block;
72-
width: 120px;
72+
width: 150px;
7373
}
7474

7575
.prefixed-input {

src/frontend/src/components/retro-formats/mood/MoodRetro.less

+5-1
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,16 @@
5959

6060
.face-icon {
6161
position: relative;
62-
margin-top: -20px;
62+
margin-top: -0.4em;
6363
text-shadow:
6464
0 4px 8px rgba(0, 0, 0, 0.2),
6565
0 2px 3px rgba(0, 0, 0, 0.2);
6666
z-index: 1;
6767
}
68+
69+
.face-icon.boring {
70+
margin-top: -0.05em;
71+
}
6872
}
6973
}
7074

src/frontend/src/components/retro-formats/mood/categories/FaceIcon.tsx

+20-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import React, { memo } from 'react';
2+
import classNames from 'classnames';
23
import './FaceIcon.less';
34

45
type Type = 'happy' | 'meh' | 'sad';
56

67
interface Theme {
78
name: string;
89
icons: Record<Type, string>;
10+
extraClassName?: string;
911
}
1012

1113
const THEMES = new Map<string, Theme>();
@@ -73,6 +75,16 @@ THEMES.set('silly', {
7375
},
7476
});
7577

78+
THEMES.set('boring-faces', {
79+
name: 'Faces (padded)',
80+
icons: {
81+
happy: '\uD83D\uDE03',
82+
meh: '\uD83E\uDD28',
83+
sad: '\uD83D\uDE22',
84+
},
85+
extraClassName: 'boring',
86+
});
87+
7688
const DEFAULT_THEME = THEMES.values().next().value;
7789

7890
export function getTheme(name: string): Theme {
@@ -91,8 +103,11 @@ interface PropsT {
91103
export default memo(({
92104
theme,
93105
type,
94-
}: PropsT) => (
95-
<div className="face-icon">
96-
{ getTheme(theme).icons[type as Type] }
97-
</div>
98-
));
106+
}: PropsT) => {
107+
const { icons, extraClassName } = getTheme(theme);
108+
return (
109+
<div className={classNames('face-icon', extraClassName)}>
110+
{ icons[type as Type] }
111+
</div>
112+
);
113+
});

0 commit comments

Comments
 (0)