@deepgram/styles 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +285 -317
- package/design-system.yaml +18 -1
- package/dist/deepgram.css +1 -1
- package/dist/deepgram.expanded.css +86 -7
- package/package.json +1 -1
- package/dist/react/BtnCollapse.d.ts +0 -4
- package/dist/react/BtnCollapse.js +0 -9
- package/dist/react/BtnDangerGhost.d.ts +0 -4
- package/dist/react/BtnDangerGhost.js +0 -9
- package/dist/react/BtnGhost.d.ts +0 -4
- package/dist/react/BtnGhost.js +0 -9
- package/dist/react/BtnIcon.d.ts +0 -4
- package/dist/react/BtnIcon.js +0 -9
- package/dist/react/BtnSecondary.d.ts +0 -4
- package/dist/react/BtnSecondary.js +0 -9
- package/dist/react/BtnSmall.d.ts +0 -4
- package/dist/react/BtnSmall.js +0 -9
- package/dist/react/Header.d.ts +0 -25
- package/dist/react/Header.js +0 -58
- package/dist/react/Link.d.ts +0 -4
- package/dist/react/Link.js +0 -9
- package/dist/react/Modal.d.ts +0 -8
- package/dist/react/Modal.js +0 -17
- package/src/react/BtnCollapse.tsx +0 -14
- package/src/react/BtnDangerGhost.tsx +0 -14
- package/src/react/BtnGhost.tsx +0 -14
- package/src/react/BtnIcon.tsx +0 -14
- package/src/react/BtnSecondary.tsx +0 -14
- package/src/react/BtnSmall.tsx +0 -14
- package/src/react/Header.tsx +0 -105
- package/src/react/Link.tsx +0 -14
- package/src/react/Modal.tsx +0 -29
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
export const BtnSecondary = forwardRef(function BtnSecondary({ className, children, ...props }, ref) {
|
|
4
|
-
const cls = [
|
|
5
|
-
'dg-btn-secondary',
|
|
6
|
-
className,
|
|
7
|
-
].filter(Boolean).join(' ');
|
|
8
|
-
return _jsx("div", { ref: ref, className: cls, ...props, children: children });
|
|
9
|
-
});
|
package/dist/react/BtnSmall.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
-
export interface BtnSmallProps extends ComponentPropsWithRef<'div'> {
|
|
3
|
-
}
|
|
4
|
-
export declare const BtnSmall: import("react").ForwardRefExoticComponent<Omit<BtnSmallProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/react/BtnSmall.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
export const BtnSmall = forwardRef(function BtnSmall({ className, children, ...props }, ref) {
|
|
4
|
-
const cls = [
|
|
5
|
-
'dg-btn-small',
|
|
6
|
-
className,
|
|
7
|
-
].filter(Boolean).join(' ');
|
|
8
|
-
return _jsx("div", { ref: ref, className: cls, ...props, children: children });
|
|
9
|
-
});
|
package/dist/react/Header.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
-
export interface HeaderProps extends ComponentPropsWithRef<'header'> {
|
|
3
|
-
}
|
|
4
|
-
export declare const Header: import("react").ForwardRefExoticComponent<Omit<HeaderProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
5
|
-
export interface HeaderContainerProps extends ComponentPropsWithRef<'div'> {
|
|
6
|
-
}
|
|
7
|
-
export declare const HeaderContainer: import("react").ForwardRefExoticComponent<Omit<HeaderContainerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export interface HeaderLogoProps extends ComponentPropsWithRef<'div'> {
|
|
9
|
-
}
|
|
10
|
-
export declare const HeaderLogo: import("react").ForwardRefExoticComponent<Omit<HeaderLogoProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export interface HeaderLogoImageProps extends ComponentPropsWithRef<'img'> {
|
|
12
|
-
}
|
|
13
|
-
export declare const HeaderLogoImage: import("react").ForwardRefExoticComponent<Omit<HeaderLogoImageProps, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
14
|
-
export interface HeaderLogoTextProps extends ComponentPropsWithRef<'span'> {
|
|
15
|
-
}
|
|
16
|
-
export declare const HeaderLogoText: import("react").ForwardRefExoticComponent<Omit<HeaderLogoTextProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
17
|
-
export interface HeaderNavProps extends ComponentPropsWithRef<'nav'> {
|
|
18
|
-
}
|
|
19
|
-
export declare const HeaderNav: import("react").ForwardRefExoticComponent<Omit<HeaderNavProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
20
|
-
export interface HeaderProfileLinkProps extends ComponentPropsWithRef<'a'> {
|
|
21
|
-
}
|
|
22
|
-
export declare const HeaderProfileLink: import("react").ForwardRefExoticComponent<Omit<HeaderProfileLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
23
|
-
export interface HeaderProfileAvatarProps extends ComponentPropsWithRef<'img'> {
|
|
24
|
-
}
|
|
25
|
-
export declare const HeaderProfileAvatar: import("react").ForwardRefExoticComponent<Omit<HeaderProfileAvatarProps, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
package/dist/react/Header.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
export const Header = forwardRef(function Header({ className, children, ...props }, ref) {
|
|
4
|
-
const cls = [
|
|
5
|
-
'dg-header',
|
|
6
|
-
className,
|
|
7
|
-
].filter(Boolean).join(' ');
|
|
8
|
-
return _jsx("header", { ref: ref, className: cls, ...props, children: children });
|
|
9
|
-
});
|
|
10
|
-
export const HeaderContainer = forwardRef(function HeaderContainer({ className, children, ...props }, ref) {
|
|
11
|
-
const cls = [
|
|
12
|
-
'dg-header__container',
|
|
13
|
-
className,
|
|
14
|
-
].filter(Boolean).join(' ');
|
|
15
|
-
return _jsx("div", { ref: ref, className: cls, ...props, children: children });
|
|
16
|
-
});
|
|
17
|
-
export const HeaderLogo = forwardRef(function HeaderLogo({ className, children, ...props }, ref) {
|
|
18
|
-
const cls = [
|
|
19
|
-
'dg-header__logo',
|
|
20
|
-
className,
|
|
21
|
-
].filter(Boolean).join(' ');
|
|
22
|
-
return _jsx("div", { ref: ref, className: cls, ...props, children: children });
|
|
23
|
-
});
|
|
24
|
-
export const HeaderLogoImage = forwardRef(function HeaderLogoImage({ className, ...props }, ref) {
|
|
25
|
-
const cls = [
|
|
26
|
-
'dg-header__logo-image',
|
|
27
|
-
className,
|
|
28
|
-
].filter(Boolean).join(' ');
|
|
29
|
-
return _jsx("img", { ref: ref, className: cls, ...props });
|
|
30
|
-
});
|
|
31
|
-
export const HeaderLogoText = forwardRef(function HeaderLogoText({ className, children, ...props }, ref) {
|
|
32
|
-
const cls = [
|
|
33
|
-
'dg-header__logo-text',
|
|
34
|
-
className,
|
|
35
|
-
].filter(Boolean).join(' ');
|
|
36
|
-
return _jsx("span", { ref: ref, className: cls, ...props, children: children });
|
|
37
|
-
});
|
|
38
|
-
export const HeaderNav = forwardRef(function HeaderNav({ className, children, ...props }, ref) {
|
|
39
|
-
const cls = [
|
|
40
|
-
'dg-header__nav',
|
|
41
|
-
className,
|
|
42
|
-
].filter(Boolean).join(' ');
|
|
43
|
-
return _jsx("nav", { ref: ref, className: cls, ...props, children: children });
|
|
44
|
-
});
|
|
45
|
-
export const HeaderProfileLink = forwardRef(function HeaderProfileLink({ className, children, ...props }, ref) {
|
|
46
|
-
const cls = [
|
|
47
|
-
'dg-header__profile-link',
|
|
48
|
-
className,
|
|
49
|
-
].filter(Boolean).join(' ');
|
|
50
|
-
return _jsx("a", { ref: ref, className: cls, ...props, children: children });
|
|
51
|
-
});
|
|
52
|
-
export const HeaderProfileAvatar = forwardRef(function HeaderProfileAvatar({ className, ...props }, ref) {
|
|
53
|
-
const cls = [
|
|
54
|
-
'dg-header__profile-avatar',
|
|
55
|
-
className,
|
|
56
|
-
].filter(Boolean).join(' ');
|
|
57
|
-
return _jsx("img", { ref: ref, className: cls, ...props });
|
|
58
|
-
});
|
package/dist/react/Link.d.ts
DELETED
package/dist/react/Link.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
export const Link = forwardRef(function Link({ className, children, ...props }, ref) {
|
|
4
|
-
const cls = [
|
|
5
|
-
'dg-link',
|
|
6
|
-
className,
|
|
7
|
-
].filter(Boolean).join(' ');
|
|
8
|
-
return _jsx("a", { ref: ref, className: cls, ...props, children: children });
|
|
9
|
-
});
|
package/dist/react/Modal.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
-
export interface ModalProps extends ComponentPropsWithRef<'div'> {
|
|
3
|
-
visible?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const Modal: import("react").ForwardRefExoticComponent<Omit<ModalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export interface ModalContentProps extends ComponentPropsWithRef<'div'> {
|
|
7
|
-
}
|
|
8
|
-
export declare const ModalContent: import("react").ForwardRefExoticComponent<Omit<ModalContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
package/dist/react/Modal.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from 'react';
|
|
3
|
-
export const Modal = forwardRef(function Modal({ visible, className, children, ...props }, ref) {
|
|
4
|
-
const cls = [
|
|
5
|
-
'dg-modal',
|
|
6
|
-
visible && 'dg-modal--visible',
|
|
7
|
-
className,
|
|
8
|
-
].filter(Boolean).join(' ');
|
|
9
|
-
return _jsx("div", { ref: ref, className: cls, ...props, children: children });
|
|
10
|
-
});
|
|
11
|
-
export const ModalContent = forwardRef(function ModalContent({ className, children, ...props }, ref) {
|
|
12
|
-
const cls = [
|
|
13
|
-
'dg-modal__content',
|
|
14
|
-
className,
|
|
15
|
-
].filter(Boolean).join(' ');
|
|
16
|
-
return _jsx("div", { ref: ref, className: cls, ...props, children: children });
|
|
17
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface BtnCollapseProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const BtnCollapse = forwardRef<HTMLDivElement, BtnCollapseProps>(
|
|
7
|
-
function BtnCollapse({ className, children, ...props }, ref) {
|
|
8
|
-
const cls = [
|
|
9
|
-
'dg-btn-collapse',
|
|
10
|
-
className,
|
|
11
|
-
].filter(Boolean).join(' ');
|
|
12
|
-
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
-
}
|
|
14
|
-
);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface BtnDangerGhostProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const BtnDangerGhost = forwardRef<HTMLDivElement, BtnDangerGhostProps>(
|
|
7
|
-
function BtnDangerGhost({ className, children, ...props }, ref) {
|
|
8
|
-
const cls = [
|
|
9
|
-
'dg-btn-danger-ghost',
|
|
10
|
-
className,
|
|
11
|
-
].filter(Boolean).join(' ');
|
|
12
|
-
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
-
}
|
|
14
|
-
);
|
package/src/react/BtnGhost.tsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface BtnGhostProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const BtnGhost = forwardRef<HTMLDivElement, BtnGhostProps>(
|
|
7
|
-
function BtnGhost({ className, children, ...props }, ref) {
|
|
8
|
-
const cls = [
|
|
9
|
-
'dg-btn-ghost',
|
|
10
|
-
className,
|
|
11
|
-
].filter(Boolean).join(' ');
|
|
12
|
-
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
-
}
|
|
14
|
-
);
|
package/src/react/BtnIcon.tsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface BtnIconProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const BtnIcon = forwardRef<HTMLDivElement, BtnIconProps>(
|
|
7
|
-
function BtnIcon({ className, children, ...props }, ref) {
|
|
8
|
-
const cls = [
|
|
9
|
-
'dg-btn-icon',
|
|
10
|
-
className,
|
|
11
|
-
].filter(Boolean).join(' ');
|
|
12
|
-
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
-
}
|
|
14
|
-
);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface BtnSecondaryProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const BtnSecondary = forwardRef<HTMLDivElement, BtnSecondaryProps>(
|
|
7
|
-
function BtnSecondary({ className, children, ...props }, ref) {
|
|
8
|
-
const cls = [
|
|
9
|
-
'dg-btn-secondary',
|
|
10
|
-
className,
|
|
11
|
-
].filter(Boolean).join(' ');
|
|
12
|
-
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
-
}
|
|
14
|
-
);
|
package/src/react/BtnSmall.tsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface BtnSmallProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const BtnSmall = forwardRef<HTMLDivElement, BtnSmallProps>(
|
|
7
|
-
function BtnSmall({ className, children, ...props }, ref) {
|
|
8
|
-
const cls = [
|
|
9
|
-
'dg-btn-small',
|
|
10
|
-
className,
|
|
11
|
-
].filter(Boolean).join(' ');
|
|
12
|
-
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
13
|
-
}
|
|
14
|
-
);
|
package/src/react/Header.tsx
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface HeaderProps extends ComponentPropsWithRef<'header'> {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const Header = forwardRef<HTMLElement, HeaderProps>(
|
|
7
|
-
function Header({ className, children, ...props }, ref) {
|
|
8
|
-
const cls = [
|
|
9
|
-
'dg-header',
|
|
10
|
-
className,
|
|
11
|
-
].filter(Boolean).join(' ');
|
|
12
|
-
return <header ref={ref} className={cls} {...props}>{children}</header>;
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
export interface HeaderContainerProps extends ComponentPropsWithRef<'div'> {
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const HeaderContainer = forwardRef<HTMLDivElement, HeaderContainerProps>(
|
|
20
|
-
function HeaderContainer({ className, children, ...props }, ref) {
|
|
21
|
-
const cls = [
|
|
22
|
-
'dg-header__container',
|
|
23
|
-
className,
|
|
24
|
-
].filter(Boolean).join(' ');
|
|
25
|
-
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
export interface HeaderLogoProps extends ComponentPropsWithRef<'div'> {
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export const HeaderLogo = forwardRef<HTMLDivElement, HeaderLogoProps>(
|
|
33
|
-
function HeaderLogo({ className, children, ...props }, ref) {
|
|
34
|
-
const cls = [
|
|
35
|
-
'dg-header__logo',
|
|
36
|
-
className,
|
|
37
|
-
].filter(Boolean).join(' ');
|
|
38
|
-
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
export interface HeaderLogoImageProps extends ComponentPropsWithRef<'img'> {
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export const HeaderLogoImage = forwardRef<HTMLImageElement, HeaderLogoImageProps>(
|
|
46
|
-
function HeaderLogoImage({ className, ...props }, ref) {
|
|
47
|
-
const cls = [
|
|
48
|
-
'dg-header__logo-image',
|
|
49
|
-
className,
|
|
50
|
-
].filter(Boolean).join(' ');
|
|
51
|
-
return <img ref={ref} className={cls} {...props} />;
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
export interface HeaderLogoTextProps extends ComponentPropsWithRef<'span'> {
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export const HeaderLogoText = forwardRef<HTMLSpanElement, HeaderLogoTextProps>(
|
|
59
|
-
function HeaderLogoText({ className, children, ...props }, ref) {
|
|
60
|
-
const cls = [
|
|
61
|
-
'dg-header__logo-text',
|
|
62
|
-
className,
|
|
63
|
-
].filter(Boolean).join(' ');
|
|
64
|
-
return <span ref={ref} className={cls} {...props}>{children}</span>;
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
export interface HeaderNavProps extends ComponentPropsWithRef<'nav'> {
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export const HeaderNav = forwardRef<HTMLElement, HeaderNavProps>(
|
|
72
|
-
function HeaderNav({ className, children, ...props }, ref) {
|
|
73
|
-
const cls = [
|
|
74
|
-
'dg-header__nav',
|
|
75
|
-
className,
|
|
76
|
-
].filter(Boolean).join(' ');
|
|
77
|
-
return <nav ref={ref} className={cls} {...props}>{children}</nav>;
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
export interface HeaderProfileLinkProps extends ComponentPropsWithRef<'a'> {
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export const HeaderProfileLink = forwardRef<HTMLAnchorElement, HeaderProfileLinkProps>(
|
|
85
|
-
function HeaderProfileLink({ className, children, ...props }, ref) {
|
|
86
|
-
const cls = [
|
|
87
|
-
'dg-header__profile-link',
|
|
88
|
-
className,
|
|
89
|
-
].filter(Boolean).join(' ');
|
|
90
|
-
return <a ref={ref} className={cls} {...props}>{children}</a>;
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
export interface HeaderProfileAvatarProps extends ComponentPropsWithRef<'img'> {
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export const HeaderProfileAvatar = forwardRef<HTMLImageElement, HeaderProfileAvatarProps>(
|
|
98
|
-
function HeaderProfileAvatar({ className, ...props }, ref) {
|
|
99
|
-
const cls = [
|
|
100
|
-
'dg-header__profile-avatar',
|
|
101
|
-
className,
|
|
102
|
-
].filter(Boolean).join(' ');
|
|
103
|
-
return <img ref={ref} className={cls} {...props} />;
|
|
104
|
-
}
|
|
105
|
-
);
|
package/src/react/Link.tsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface LinkProps extends ComponentPropsWithRef<'a'> {
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const Link = forwardRef<HTMLAnchorElement, LinkProps>(
|
|
7
|
-
function Link({ className, children, ...props }, ref) {
|
|
8
|
-
const cls = [
|
|
9
|
-
'dg-link',
|
|
10
|
-
className,
|
|
11
|
-
].filter(Boolean).join(' ');
|
|
12
|
-
return <a ref={ref} className={cls} {...props}>{children}</a>;
|
|
13
|
-
}
|
|
14
|
-
);
|
package/src/react/Modal.tsx
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { forwardRef, type ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface ModalProps extends ComponentPropsWithRef<'div'> {
|
|
4
|
-
visible?: boolean;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export const Modal = forwardRef<HTMLDivElement, ModalProps>(
|
|
8
|
-
function Modal({ visible, className, children, ...props }, ref) {
|
|
9
|
-
const cls = [
|
|
10
|
-
'dg-modal',
|
|
11
|
-
visible && 'dg-modal--visible',
|
|
12
|
-
className,
|
|
13
|
-
].filter(Boolean).join(' ');
|
|
14
|
-
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
15
|
-
}
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
export interface ModalContentProps extends ComponentPropsWithRef<'div'> {
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const ModalContent = forwardRef<HTMLDivElement, ModalContentProps>(
|
|
22
|
-
function ModalContent({ className, children, ...props }, ref) {
|
|
23
|
-
const cls = [
|
|
24
|
-
'dg-modal__content',
|
|
25
|
-
className,
|
|
26
|
-
].filter(Boolean).join(' ');
|
|
27
|
-
return <div ref={ref} className={cls} {...props}>{children}</div>;
|
|
28
|
-
}
|
|
29
|
-
);
|