Skip to content

Commit b863499

Browse files
committed
(#6140) Sample screenshots for component overview, changed component overview and styles
1 parent f46bb14 commit b863499

File tree

14 files changed

+30
-42
lines changed

14 files changed

+30
-42
lines changed

dev/src/components/docs/ComponentList.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ const LazyLoadComponent: FC<Component & Language> = ({ name, lang, loadComponent
4848
onKeyDown={handleRedirect}
4949
onClick={handleRedirect}
5050
>
51-
<KolCard _level={2} _label={formattedComponentName}>
52-
<SampleComponent lang={lang} />
51+
<KolCard aria-label={formattedComponentName} role="img" _level={2} _label={formattedComponentName}>
52+
<div aria-hidden="true">
53+
<SampleComponent lang={lang} />
54+
</div>
5355
</KolCard>
5456
</a>
5557
</Suspense>
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import type { FC } from 'react';
21
import React from 'react';
3-
import type { Language } from '../../shares/language';
4-
import { MESSAGES } from '../../shares/language';
2+
import { KolImage } from '@public-ui/react';
53

6-
type Props = Language;
7-
8-
const Dialog: FC<Props> = ({ lang }) => <p>{MESSAGES?.[lang]?.components?.noPreview}</p>;
4+
const Dialog = () => <KolImage _src="/assets/samples/modal.png" _alt="Sample Image - Dialog" _sizes="20vw"/>;
95

106
export default Dialog;
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import type { FC } from 'react';
21
import React from 'react';
3-
import type { Language } from '../../shares/language';
4-
import { MESSAGES } from '../../shares/language';
2+
import { KolImage } from '@public-ui/react';
53

6-
type Props = Language;
7-
8-
const Modal: FC<Props> = ({ lang }) => <p>{MESSAGES?.[lang]?.components?.noPreview}</p>;
4+
const Modal = () => <KolImage _src="/assets/samples/modal.png" _alt="Sample Image - Modal" _sizes="20vw"/>;
95

106
export default Modal;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from 'react';
2+
import { KolImage } from '@public-ui/react';
3+
4+
const Popover = () => <KolImage _src="/assets/samples/tooltip.png" _alt="Sample Image - Popover" _sizes="20vw"/>;
5+
6+
export default Popover;
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import type { FC } from 'react';
21
import React from 'react';
3-
import type { Language } from '../../shares/language';
4-
import { MESSAGES } from '../../shares/language';
2+
import { KolImage } from '@public-ui/react';
53

6-
type Props = Language;
7-
8-
const SkipNav: FC<Props> = ({ lang }) => <p>{MESSAGES?.[lang]?.components?.noPreview}</p>;
4+
const SkipNav = () => <KolImage _src="/assets/samples/skip-nav.png" _alt="Sample Image - Skip-Nav" _sizes="20vw"/>;
95

106
export default SkipNav;
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import React from 'react';
2-
import { KolSplitButton } from '@public-ui/react';
2+
import { KolImage } from '@public-ui/react';
33

4-
const SplitButton = () => (
5-
<KolSplitButton _label="Label" _hideLabel _icons="codicon codicon-git-pull-request">
6-
Dropdown-Inhalt
7-
</KolSplitButton>
8-
);
4+
const SplitButton = () => <KolImage _src="/assets/samples/split-button.png" _alt="Sample Image - Split-Button" _sizes="20vw"/>;
95

106
export default SplitButton;
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { FC } from 'react';
21
import React from 'react';
3-
import type { Language } from '../../shares/language';
4-
import { MESSAGES } from '../../shares/language';
2+
import { KolAlert } from '@public-ui/react';
53

6-
type Props = Language;
7-
8-
const Toaster: FC<Props> = ({ lang }) => <p>{MESSAGES?.[lang]?.components?.noPreview}</p>;
4+
const Toaster = () => (
5+
<KolAlert _label="Title" _level={5} _type="error" _variant="card">
6+
Content
7+
</KolAlert>
8+
);
99

1010
export default Toaster;
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import type { FC } from 'react';
21
import React from 'react';
3-
import type { Language } from '../../shares/language';
4-
import { MESSAGES } from '../../shares/language';
2+
import { KolImage } from '@public-ui/react';
53

6-
type Props = Language;
7-
8-
const Tooltip: FC<Props> = ({ lang }) => <p>{MESSAGES?.[lang]?.components?.noPreview}</p>;
4+
const Tooltip = () => <KolImage _src="/assets/samples/tooltip.png" _alt="Sample Image - Tooltip" _sizes="20vw"/>;
95

106
export default Tooltip;

dev/src/components/samplePreviews/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ export const components = [
133133
name: 'pagination',
134134
loadComponent: () => lazy(() => import('./Pagination')),
135135
},
136+
{
137+
name: 'popover',
138+
loadComponent: () => lazy(() => import('./Popover')),
139+
},
136140
{
137141
name: 'progress',
138142
loadComponent: () => lazy(() => import('./Progress')),

dev/src/css/custom.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,3 @@ kol-link-button {
159159
height: 300px;
160160
cursor: pointer;
161161
}
162-
163-
.components-overview-item kol-card {
164-
pointer-events: none;
165-
}

0 commit comments

Comments
 (0)