Skip to content

Commit

Permalink
Fixing Splitbutton height (#138)
Browse files Browse the repository at this point in the history
* Fixing splitbutton height spacing issues

* Updating variables.
  • Loading branch information
gjones authored Sep 13, 2023
1 parent 730541d commit 1ddaeeb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/components/SplitButton/SplitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export const SplitButton = ({
};
const DropdownContent = styled.div<{ $width: number }>`
min-width: ${({ $width }) => $width}px;
background: red;
`;

const IconWrapper = ({ label, icon, iconDir }: Omit<MenuItem, "type" | "items">) => {
Expand Down Expand Up @@ -231,9 +230,11 @@ const SplitButtonTrigger = styled.div<{ $disabled?: boolean; $type: ButtonType }
`;

const PrimaryButton = styled(BaseButton)<{ $type: ButtonType }>`
border: none;
border: 1px solid transparent;
align-self: stretch;
border-radius: 0;
padding: ${({ theme }) => theme.click.button.split.space.y}
${({ theme }) => theme.click.button.split.space.x};
${({ theme, $type }) => `
background: ${theme.click.button.split[$type].background.main.default};
color: ${theme.click.button.split[$type].text.default};
Expand Down
5 changes: 5 additions & 0 deletions src/styles/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,11 @@
"x": string
}
},
"space": {
"x": string,
"y": string,
"gap": string
},
"primary": {
"background": {
"main": {
Expand Down
7 changes: 6 additions & 1 deletion src/styles/variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,11 @@
"x": "0.344rem"
}
},
"space": {
"x": "1rem",
"y": "0.281rem",
"gap": "0.5rem"
},
"primary": {
"background": {
"main": {
Expand Down Expand Up @@ -1082,7 +1087,7 @@
"label": {
"default": "400 0.875rem/1.5 \"Inter\", '\"SF Pro Display\"', -apple-system, BlinkMacSystemFont, '\"Segoe UI\"', Roboto, Oxygen, Ubuntu, Cantarell, '\"Open Sans\"', '\"Helvetica Neue\"', sans-serif;",
"hover": "400 0.875rem/1.5 \"Inter\", '\"SF Pro Display\"', -apple-system, BlinkMacSystemFont, '\"Segoe UI\"', Roboto, Oxygen, Ubuntu, Cantarell, '\"Open Sans\"', '\"Helvetica Neue\"', sans-serif;",
"active": "600 0.875rem/1.5 \"Inter\", '\"SF Pro Display\"', -apple-system, BlinkMacSystemFont, '\"Segoe UI\"', Roboto, Oxygen, Ubuntu, Cantarell, '\"Open Sans\"', '\"Helvetica Neue\"', sans-serif;",
"active": "400 0.875rem/1.5 \"Inter\", '\"SF Pro Display\"', -apple-system, BlinkMacSystemFont, '\"Segoe UI\"', Roboto, Oxygen, Ubuntu, Cantarell, '\"Open Sans\"', '\"Helvetica Neue\"', sans-serif;",
"disabled": "400 0.875rem/1.5 \"Inter\", '\"SF Pro Display\"', -apple-system, BlinkMacSystemFont, '\"Segoe UI\"', Roboto, Oxygen, Ubuntu, Cantarell, '\"Open Sans\"', '\"Helvetica Neue\"', sans-serif;"
},
"sectionHeader": {
Expand Down

1 comment on commit 1ddaeeb

@vercel
Copy link

@vercel vercel bot commented on 1ddaeeb Sep 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

click-ui – ./

click-ui.vercel.app
click-ui-git-main-clickhouse.vercel.app
click-ui-clickhouse.vercel.app

Please sign in to comment.