diff --git a/app/documentation/api/page.tsx b/app/documentation/api/page.tsx index 6c9cd62e..cce98bbd 100644 --- a/app/documentation/api/page.tsx +++ b/app/documentation/api/page.tsx @@ -6,15 +6,14 @@ import Text from '@/components/Text' export default function ApiMainPage() { return <> -
Oskari API is defined as bundles. Bundle is a definition of functionality that may provide external API to control the functionality. - -
+ +

Building a custom Oskari application

-

Choose the functionalities from bundle documentation

+

Choose the functionalities from bundle documentation

-
-

Reacting to events

-
+
+
+

Controlling existing functionality

+
+
+

Reacting to events

+
-
-
; } diff --git a/components/Checkbox/Checkbox.tsx b/components/Checkbox/Checkbox.tsx index 4dd7d81d..324deb54 100644 --- a/components/Checkbox/Checkbox.tsx +++ b/components/Checkbox/Checkbox.tsx @@ -1,14 +1,19 @@ 'use client' import styles from '@/styles/checkbox.module.scss' import { ReactNode } from 'react'; +import { KeyboardEvent } from 'react'; export function CheckboxGroup({children}: {children: Array}) { return
{children}
} +function shouldToggle(event: KeyboardEvent) { + return event?.key === 'Enter'; +} + export default function Checkbox({isChecked, title, onChange}: {isChecked: boolean, title: string, onChange: (checked: boolean) => void}) { - return
onChange(!isChecked)}> -
{title}
- + return
onChange(!isChecked)}> + + { if (shouldToggle(event)) { onChange(!isChecked); }}}/>
; } diff --git a/styles/accordion.module.scss b/styles/accordion.module.scss index ca4eb76b..4e43f6c3 100644 --- a/styles/accordion.module.scss +++ b/styles/accordion.module.scss @@ -124,7 +124,7 @@ /*uncover the top border of active link of the first list element*/ li:first-child { - margin-top: 0.2rem; + margin-top: 0.3rem; } } } diff --git a/styles/checkbox.module.scss b/styles/checkbox.module.scss index 8f5d7907..3429b763 100644 --- a/styles/checkbox.module.scss +++ b/styles/checkbox.module.scss @@ -12,6 +12,10 @@ display: flex; flex-direction: row; + &:has(input:active), &:has(input:focus) { + outline: auto; + } + &__header { background-color: var(--color-light); font-weight: 700; diff --git a/styles/main.scss b/styles/main.scss index 656d76e6..dcb623e1 100644 --- a/styles/main.scss +++ b/styles/main.scss @@ -138,7 +138,7 @@ h3 { .content-wrapper { /*bring this further up so it's closer to balloons.*/ - margin-top: -20rem; + margin-top: -30vh; /*make sure this appears on top of balloons*/ z-index: 2; /*make sure we can use z-index and thus sure this stays on top of the balloons*/