An open source design system that's fully customizable and agent ready
TypeScript
fix(core): remove redundant prop re-declarations and fix semantic type token (#3655)
Cindy Zhang36830894556c
diff --git a/packages/core/src/DateRangeInput/DateRangeInput.tsx b/packages/core/src/DateRangeInput/DateRangeInput.tsxindex 4cbb35c013..4236fc6a7a 100644--- a/packages/core/src/DateRangeInput/DateRangeInput.tsx+++ b/packages/core/src/DateRangeInput/DateRangeInput.tsx@@ -146,8 +146,8 @@ const styles = stylex.create({},},fontFamily: typographyVars['--font-family-body'],- fontSize: typeScaleVars['--text-body-size'],- lineHeight: typeScaleVars['--text-body-leading'],+ fontSize: typeScaleVars['--text-label-size'],+ lineHeight: typeScaleVars['--text-label-leading'],color: colorVars['--color-text-primary'],cursor: 'pointer',textAlign: 'start',diff --git a/packages/core/src/DateTimeInput/DateTimeInput.tsx b/packages/core/src/DateTimeInput/DateTimeInput.tsxindex 05faa0c7f8..96acfcffd2 100644--- a/packages/core/src/DateTimeInput/DateTimeInput.tsx+++ b/packages/core/src/DateTimeInput/DateTimeInput.tsx@@ -72,7 +72,7 @@ import {plainDateFormat,DATE_FORMAT_LONG,} from '../utils/plainDate';-import type {StyleXStyles} from '@stylexjs/stylex';+import type {BaseProps} from '../BaseProps';import type {SizeValue} from '../utils/types';import {useSize} from '../SizeContext/SizeContext';@@ -344,11 +344,6 @@ export interface DateTimeInputProps extends Omit<* @default 1*/numberOfMonths?: 1 | 2;-- /**- * Style overrides applied to the outer row container.- */- xstyle?: StyleXStyles;}function splitDateTime(dt: ISODateTimeString | undefined): {diff --git a/packages/core/src/Divider/Divider.tsx b/packages/core/src/Divider/Divider.tsxindex 369eda110a..76eec171f7 100644--- a/packages/core/src/Divider/Divider.tsx+++ b/packages/core/src/Divider/Divider.tsx@@ -18,7 +18,7 @@import type {ReactNode} from 'react';import type {BaseProps} from '../BaseProps';import * as stylex from '@stylexjs/stylex';-import type {StyleXStyles} from '@stylexjs/stylex';+import {colorVars,spacingVars,@@ -80,28 +80,6 @@ export interface DividerProps extends BaseProps<HTMLDivElement> {* @default false*/isFullBleed?: boolean;-- /**- * StyleX styles created via `stylex.create()`. Merged with the component's- * base styles inside a single `stylex.props()` call for optimal deduplication.- *- * @example- * ```- * const overrides = stylex.create({ root: { marginBottom: 8 } });- * <Component xstyle={overrides.root} />- * ```- */- xstyle?: StyleXStyles;- /**- * CSS class name(s) appended to the root element.- * If you're using StyleX, prefer `xstyle` for optimal style deduplication.- */- className?: string;- /**- * Inline styles to apply to the root element. Spread after StyleX- * inline styles, so these values take priority.- */- style?: React.CSSProperties;}const baseStyles = stylex.create({