Skip to content

Commit

Permalink
feat!: up uikit to 7
Browse files Browse the repository at this point in the history
  • Loading branch information
DaryaLari committed Jan 16, 2025
1 parent 7c412d7 commit 07c0624
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 95 deletions.
6 changes: 4 additions & 2 deletions .storybook/src/ImportsTooltip/ImportsTooltip.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
@use '~@gravity-ui/uikit/styles/mixins';

.imports-tooltip {
--g-popover-max-width: 1000px;
max-width: 1000px;

padding: var(--g-spacing-4);

&__grid {
display: grid;
grid-template-columns: max-content minmax(max-content, 1fr);
gap: 12px;
gap: var(--g-spacing-3);
}

&__label {
Expand Down
10 changes: 4 additions & 6 deletions .storybook/src/ImportsTooltip/ImportsTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import {Button, Card, Label, Popover, PopoverInstanceProps, spacing} from '@gravity-ui/uikit';
import {Button, Card, Label, Popover, spacing} from '@gravity-ui/uikit';

import {cn} from '../cn';
import {IllustrationMeta} from '../types';
Expand All @@ -15,7 +15,6 @@ export interface ImportsTooltipProps {
const b = cn('imports-tooltip');

export function ImportsTooltip({meta: {svgName, componentName}, children}: ImportsTooltipProps) {
const popoverRef = React.useRef<PopoverInstanceProps>(null);
const content = React.useMemo(() => {
const importSvgLight = buildIconSvgPath(svgName, componentName, 'light');
const importSvgDark = buildIconSvgPath(svgName, componentName, 'dark');
Expand Down Expand Up @@ -54,12 +53,11 @@ export function ImportsTooltip({meta: {svgName, componentName}, children}: Impor
<Card className={spacing({p: 2})}>
<div>
<Popover
ref={popoverRef}
content={content}
placement={['bottom', 'top']}
tooltipClassName={b()}
openOnHover={false}
disablePortal
trigger="click"
hasArrow
className={b()}
>
<Button view="flat-info">{componentName}</Button>
</Popover>
Expand Down
218 changes: 132 additions & 86 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
Expand Up @@ -39,7 +39,7 @@
"@gravity-ui/prettier-config": "^1.1.0",
"@gravity-ui/stylelint-config": "^4.0.1",
"@gravity-ui/tsconfig": "^1.0.0",
"@gravity-ui/uikit": "^6.2.0",
"@gravity-ui/uikit": "^7.0.0-beta.3",
"@storybook/addon-essentials": "^8.0.2",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/manager-api": "^8.0.2",
Expand Down

0 comments on commit 07c0624

Please sign in to comment.