Skip to content

Commit

Permalink
review(design): update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
inomdzhon committed Sep 11, 2024
1 parent a8f9c1f commit a5cf362
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 26 deletions.
7 changes: 4 additions & 3 deletions packages/vkui/src/components/ToolButton/ToolButton.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@
flex-grow: 1;
flex-basis: 0;
align-items: center;
justify-content: center;
font-family: var(--vkui--font_caption1--font_family--regular);
font-size: var(--vkui--font_caption1--font_size--regular);
line-height: var(--vkui--font_caption1--line_height--regular);
}

.ToolButton--padding-size-xl {
padding: var(--vkui--spacing_size_xl);
.ToolButton--withFakeEndIcon {
padding-inline-end: var(--vkui--spacing_size_xl);
}

.ToolButton--rounded {
Expand Down Expand Up @@ -46,10 +45,12 @@
/* ToolButton's directions */
.ToolButton--direction-row {
flex-direction: row;
justify-content: flex-start;
}

.ToolButton--direction-column {
flex-direction: column;
justify-content: center;
}

.ToolButton--direction-row .ToolButton__text {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@ export const Playground: Story = {
IconCompact: Icon20Add,
IconRegular: Icon24Add,
},
decorators: [
(Component, context) => (
<div>
<Component {...context.args} />
</div>
),
],
};
5 changes: 2 additions & 3 deletions packages/vkui/src/components/ToolButton/ToolButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const ToolButton = ({
className,
styles['ToolButton'],
rounded && getRoundedClassName(direction, hasChildren),
hasChildren && direction === 'row' && styles['ToolButton--withFakeEndIcon'],
stylesMode[mode],
stylesAppearance[appearance],
stylesDirection[direction],
Expand All @@ -91,9 +92,7 @@ export function getRoundedClassName(
): string | undefined {
switch (direction) {
case 'row':
return hasChildren
? classNames(styles['ToolButton--rounded'], styles['ToolButton--padding-size-xl'])
: styles['ToolButton--rounded'];
return styles['ToolButton--rounded'];
case 'column':
return hasChildren ? undefined : styles['ToolButton--rounded'];
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a5cf362

Please sign in to comment.