Skip to content

Commit

Permalink
chore: update box props
Browse files Browse the repository at this point in the history
  • Loading branch information
bang9 committed Oct 15, 2024
1 parent 46d349a commit 2df5dd5
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ import { isFunction } from '@sendbird/uikit-utils';
import useUIKitTheme from '../../theme/useUIKitTheme';
import type { UIKitColors, UIKitPalette } from '../../types';

type DeprecatedBoxProps = {
/** @deprecated Please use `paddingStart` instead **/
paddingLeft?: ViewStyle['paddingLeft'];
/** @deprecated Please use `paddingEnd` instead **/
paddingRight?: ViewStyle['paddingRight'];
/** @deprecated Please use `marginStart` instead **/
marginLeft?: ViewStyle['marginLeft'];
/** @deprecated Please use `marginEnd` instead **/
marginRight?: ViewStyle['marginRight'];
};

type BaseBoxProps = Pick<
ViewStyle,
| 'flex'
Expand Down Expand Up @@ -40,7 +51,7 @@ type BaseBoxProps = Pick<
backgroundColor?: string | ((theme: { colors: UIKitColors; palette: UIKitPalette }) => string);
};

type BoxProps = BaseBoxProps & ViewProps;
type BoxProps = BaseBoxProps & DeprecatedBoxProps & ViewProps;
const Box = ({ style, children, ...props }: BoxProps) => {
const boxStyle = useBoxStyle(props);

Expand Down

0 comments on commit 2df5dd5

Please sign in to comment.