-
Notifications
You must be signed in to change notification settings - Fork 1
Förbättra användarupplevelse på d-cide #116
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
base: master
Are you sure you want to change the base?
Changes from 12 commits
40f6bef
c79041a
6a908e9
1281298
4e97e62
8238c6d
4bcb180
f596db3
9a67366
4e58484
536a03c
86d3ae7
f77c4de
44d76f4
051428a
eb1cb56
11015b6
b5791b7
5984560
cad1f7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,23 +18,47 @@ const IconButton = ({ onClick, iconComponent: Icon, text, disabled }) => { | |
| ) | ||
| } | ||
|
|
||
| const Button = ({ onClick, to, href, target, children, type = 'button' }) => { | ||
| const Button = ({ | ||
| onClick, | ||
| to, | ||
| href, | ||
| target, | ||
| children, | ||
| disabled, | ||
| type = 'button', | ||
| }) => { | ||
| if (to) | ||
| return ( | ||
| <Link className={button} to={to} onClick={onClick}> | ||
| <Link | ||
| className={button} | ||
| to={to} | ||
| onClick={onClick} | ||
| aria-disabled={disabled} | ||
| > | ||
| {children} | ||
| </Link> | ||
| ) | ||
|
|
||
| if (href) | ||
| return ( | ||
| <a className={button} href={href} target={target} onClick={onClick}> | ||
| <a | ||
| className={button} | ||
| href={href} | ||
| target={target} | ||
| onClick={onClick} | ||
| aria-disabled={disabled} | ||
| > | ||
| {children} | ||
| </a> | ||
| ) | ||
|
OttoRoming marked this conversation as resolved.
Comment on lines
30
to
69
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot apply changes based on this feedback
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in f77c4de. When
|
||
|
|
||
| return ( | ||
| <button className={button} type={type} onClick={onClick}> | ||
| <button | ||
| className={button} | ||
| type={type} | ||
| onClick={onClick} | ||
| disabled={disabled} | ||
| > | ||
| {children} | ||
| </button> | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ const TitleChooser = ({ | |
| choice = null, | ||
| setChoice = () => {}, | ||
| label = '', | ||
| hintLabel = 'Välj ett objekt', | ||
| action = null, | ||
| actionLabel = '', | ||
| noChoicesLabel = '', | ||
|
Comment on lines
15
to
21
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot apply changes based on this feedback
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 44d76f4. Added |
||
|
|
@@ -91,7 +92,7 @@ const TitleChooser = ({ | |
| </optgroup> | ||
| ))} | ||
| </select> | ||
| {choice === null && <div className={hint}>Välj ett objekt</div>} | ||
| {choice === null && <div className={hint}>{hintLabel}</div>} | ||
| </div> | ||
| ) : ( | ||
| <span>{noChoicesLabel}</span> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.