Skip to content

Commit 9f7175f

Browse files
Merge pull request #367 from lara-learning/fix/cb-distance-to-day
fix: change distance & fix checkbox hover
2 parents fe56d05 + 6a10bf4 commit 9f7175f

File tree

7 files changed

+25
-3
lines changed

7 files changed

+25
-3
lines changed

packages/components/src/day-input-layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ const DayInputContainer = styled.div.withConfig({
1212

1313
const DayInputHeaderContainer = styled.div`
1414
padding: 0 ${Spacings.l};
15-
display: flex;
15+
display: grid;
1616
justify-content: space-between;
1717
align-items: center;
18+
grid-template-columns: 40% 26% 33%;
1819
`
1920

2021
const DayStatusContainer = styled.div`

packages/components/src/icons/checkboxSquare.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import React from 'react'
33
export const IconCheckboxSquare: React.FC = () => {
44
return (
55
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
6-
<title>checkboxSquare</title>
76
<path
87
d="M15.9997 7.33325H7.99967C7.63101 7.33325 7.33301 7.63125 7.33301 7.99992V15.9999C7.33301 16.3686 7.63101 16.6666 7.99967 16.6666H15.9997C16.3683 16.6666 16.6663 16.3686 16.6663 15.9999V7.99992C16.6663 7.63125 16.3683 7.33325 15.9997 7.33325ZM15.333 15.3333H8.66634V8.66659H15.333V15.3333Z"
98
id="box"

packages/components/src/select.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export interface SelectWithIconContainerProps {
2020
}
2121

2222
export const StyledSelectLabel = styled.label`
23+
justify-self: end;
2324
color: ${(props) => props.theme.mediumFont};
2425
font-size: ${FontSizes.copy};
2526
font-weight: 600;

packages/frontend/src/components/day-input.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,21 @@ const SecondaryWrapper = styled.div`
3333
align-items: center;
3434
`
3535

36+
const Text = styled.p`
37+
letter-spacing: 0.9px;
38+
margin: 0;
39+
padding: 0;
40+
font-size: 13px;
41+
font-weight: bold;
42+
white-space: pre-wrap;
43+
word-break: break-word;
44+
`
45+
46+
const CBWrapper = styled.div`
47+
display: flex;
48+
align-items: center;
49+
`
50+
3651
export interface EntryStatusType {
3752
message?: string
3853
type: string
@@ -244,7 +259,10 @@ const DayInput: React.FunctionComponent<DayInputProps> = ({
244259
inputHeader={
245260
<>
246261
<InputHeading noMargin>{getHeading()}</InputHeading>
247-
<CheckBox disabled={!!disabled} iconName={'Checkbox'} checked={halfDays} onClick={checkBox} />
262+
<CBWrapper>
263+
<CheckBox disabled={!!disabled} iconName={'Checkbox'} checked={halfDays} onClick={checkBox} />
264+
<Text>{strings.report.halfDays}</Text>
265+
</CBWrapper>
248266
{day && <DayStatusSelect disabled={disabled} day={day} secondary={false} />}
249267
</>
250268
}

packages/frontend/src/locales/de.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ const germanTranslation: Translation = {
8484
handoverTitle: 'Bericht übergeben',
8585
handoverNotificationText: 'Dein Bericht wurde übergeben und wird jetzt geprüft.',
8686
accept: 'Bericht genehmigen',
87+
halfDays: 'Halbe Tage',
8788
decline: 'Bericht zurückgeben',
8889
archived: 'Archiviert',
8990
department: {

packages/frontend/src/locales/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const englishTranslation: Translation = {
8282
handoverNotificationText: 'Your report was handed over and is now being checked.',
8383
accept: 'Approve this report',
8484
decline: 'Hand back to trainee',
85+
halfDays: 'Half Days',
8586
archived: 'Archived',
8687
department: {
8788
title: 'Department',

packages/frontend/src/locales/translation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export default interface Translation {
8080
decline: string
8181
archived: string
8282
unarchive: string
83+
halfDays: string
8384
department: {
8485
title: string
8586
departmentAddedTitle: string

0 commit comments

Comments
 (0)