Skip to content

Commit 9b2108d

Browse files
committed
Actually proper fix
1 parent 482d377 commit 9b2108d

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

packages/sdk-components-react/src/__generated__/time.props.ts

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/sdk-components-react/src/time.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { forwardRef, type ElementRef } from "react";
1+
import { forwardRef, type ComponentProps, type ElementRef } from "react";
22

33
const languages = [
44
"af",
@@ -345,8 +345,7 @@ const parseDate = (datetimeString: string) => {
345345
}
346346
};
347347

348-
type TimeProps = {
349-
dateTime?: string;
348+
type TimeProps = Pick<ComponentProps<"time">, "dateTime"> & {
350349
language?: Language;
351350
country?: Country;
352351
dateStyle?: DateStyle;
@@ -360,6 +359,7 @@ export const Time = forwardRef<ElementRef<"time">, TimeProps>(
360359
country = DEFAULT_COUNTRY,
361360
dateStyle = DEFAULT_DATE_STYLE,
362361
timeStyle = DEFAULT_TIME_STYLE,
362+
// native html attribute in react style
363363
dateTime = INITIAL_DATE_STRING,
364364
...props
365365
},

packages/sdk-components-react/src/time.ws.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ export const meta: WsComponentMeta = {
2323

2424
export const propsMeta: WsComponentPropsMeta = {
2525
props,
26-
initialProps: ["dateTime", "language", "country", "dateStyle", "timeStyle"],
26+
initialProps: ["datetime", "language", "country", "dateStyle", "timeStyle"],
2727
};

0 commit comments

Comments
 (0)