Skip to content

Commit

Permalink
type(Grid): enhance autocompletion for Col (ant-design#41453)
Browse files Browse the repository at this point in the history
* fix: better autocompletion

* chore: fix lint
  • Loading branch information
vaakian authored and RedJue committed Apr 25, 2023
1 parent 14b6530 commit 34e9977
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/grid/col.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import * as React from 'react';
import { ConfigContext } from '../config-provider';
import RowContext from './RowContext';
import { useColStyle } from './style';
import type { LiteralUnion } from '../_util/type';

// https://github.com/ant-design/ant-design/issues/14324
type ColSpanType = number | string;

type FlexType = number | 'none' | 'auto' | string;
type FlexType = number | LiteralUnion<'none' | 'auto'>;

export interface ColSize {
flex?: FlexType;
Expand Down

0 comments on commit 34e9977

Please sign in to comment.