Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mim 2037 copy glossary text #1422

Merged
merged 3 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/bundle.css
Original file line number Diff line number Diff line change
Expand Up @@ -1288,13 +1288,13 @@ a {
background: #274247;
color: #fff;
padding: 20px;
padding-top: 25px;
display: block;
}
.ssb-glossary .glossary-popup .content-box .glossary-closing {
align-items: center;
display: flex;
justify-content: center;
margin-top: 10px;
user-select: none;
width: 100%;
}
Expand All @@ -1303,10 +1303,11 @@ a {
display: flex;
align-items: center;
cursor: pointer;
padding: 0 0.75rem;
height: 44px;
}
.ssb-glossary .glossary-popup .content-box .glossary-closing button:focus {
outline: #b6e8b8 5px auto;
padding: 0 0.3rem;
}
.ssb-glossary .glossary-popup .content-box .glossary-closing button .icon {
color: #274247;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@statisticsnorway/ssb-component-library",
"version": "2.4.3",
"version": "2.4.4",
"description": "Component library for SSB (Statistics Norway)",
"main": "lib/bundle.js",
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions src/components/Glossary/_glossary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@
background: $ssb-dark-5;
color: $ssb-white;
padding: 20px;
padding-top: 25px;
display: block;

.glossary-closing {
align-items: center;
display: flex;
justify-content: center;
margin-top: 10px;
user-select: none;
width: 100%;

Expand All @@ -90,10 +90,11 @@
display: flex;
align-items: center;
cursor: pointer;
padding: 0 .75rem;
height: 44px;

&:focus {
outline: $ssb-green-2 5px auto;
padding: 0 0.3rem;
}

.icon {
Expand Down
3 changes: 1 addition & 2 deletions src/components/Glossary/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const Glossary = ({ explanation, children, className, closeText = 'Lukk', ariaLa
return (
<span className={`ssb-glossary${className ? ` ${className}` : ''}`}>
<button
ref={node}
onClick={() => setOpen(!open)}
className='glossary-button'
aria-label={ariaLabel || children}
Expand All @@ -57,7 +56,7 @@ const Glossary = ({ explanation, children, className, closeText = 'Lukk', ariaLa
<span className='glossary-text-wrap'>{children}</span>
<BookOpen size={12} className='glossary-logo' aria-hidden='true' />
</button>
<span className={`glossary-popup${open ? ' open' : ''}`}>
<span className={`glossary-popup${open ? ' open' : ''}`} ref={node}>
<span className='content-box'>
<span className='info-text'>{explanation}</span>
<span className='glossary-closing'>
Expand Down
Loading