Skip to content

Commit

Permalink
Add type="button" to Select Button (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
raczyk authored Jul 28, 2020
1 parent f9995e1 commit 584810f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nordcloud/gnui",
"version": "0.4.18",
"version": "0.4.19",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": "git://github.com/nordcloud/gnui.git",
Expand Down
30 changes: 21 additions & 9 deletions src/components/selectbutton/SelectButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,29 @@ export const SelectButton: FunctionComponent<SelectButtonProps> = ({
id = "",
onClick,
...props
}) => <li><button value={value} name={name} className={isActive ? "active" : ""} {...props} onClick={() => onClick(value)}>
{labelText}
</button></li>;
}) => (
<li>
<button
type="button"
value={value}
name={name}
className={isActive ? "active" : ""}
{...props}
onClick={() => onClick(value)}
>
{labelText}
</button>
</li>
);

export const MultipleSelect: FunctionComponent<SelectButtonListProps> = ({
export const MultipleSelect: FunctionComponent<SelectButtonListProps> = ({
status,
children,
size
size,
}) => {
return (
<StyledSelectButtons status={status} size={size}>
{children}
</StyledSelectButtons>
)};
<StyledSelectButtons status={status} size={size}>
{children}
</StyledSelectButtons>
);
};

0 comments on commit 584810f

Please sign in to comment.