Skip to content

Commit d913839

Browse files
Merge pull request #2468 from dxc-technology/jialecl/timeInputpreview
[doc] TimeInput previews added to theme generator
2 parents 54659ed + 2b7c001 commit d913839

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

apps/website/screens/theme-generator/componentsRegistry.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
TabsPreview,
3232
TextareaPreview,
3333
TextInputPreview,
34+
TimeInputPreview,
3435
ToastPreview,
3536
ToggleGroupPreview,
3637
TooltipPreview,
@@ -64,6 +65,7 @@ export const componentsRegistry = {
6465
"/components/switch": SwitchPreview,
6566
"/components/text-input": TextInputPreview,
6667
"/components/textarea": TextareaPreview,
68+
"/components/time-input": TimeInputPreview,
6769
"/components/toggle-group": ToggleGroupPreview,
6870
"/components/breadcrumbs": BreadcrumbsPreview,
6971
"/components/contextual-menu": ContextualMenuPreview,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { DxcFlex, DxcTimeInput } from "@dxc-technology/halstack-react";
2+
const TimeInputPreview = () => {
3+
return (
4+
<DxcFlex gap="var(--spacing-gap-ml)">
5+
<DxcTimeInput label="Start time" helperText="We'll use this time to schedule your appointment." />
6+
<DxcTimeInput
7+
label="End time"
8+
helperText="We'll use this time to schedule your appointment."
9+
error="Incorrect time"
10+
/>
11+
</DxcFlex>
12+
);
13+
};
14+
15+
export default TimeInputPreview;

apps/website/screens/theme-generator/previews/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export { default as TablePreview } from "./TablePreview";
3030
export { default as TabsPreview } from "./TabsPreview";
3131
export { default as TextareaPreview } from "./TextareaPreview";
3232
export { default as TextInputPreview } from "./TextInputPreview";
33+
export { default as TimeInputPreview } from "./TimeInputPreview";
3334
export { default as ToastPreview } from "./ToastPreview";
3435
export { default as ToggleGroupPreview } from "./ToggleGroupPreview";
3536
export { default as TooltipPreview } from "./TooltipPreview";

0 commit comments

Comments
 (0)