Skip to content

Commit

Permalink
added new color typesin Box
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitmalhotra1420 committed Jul 9, 2024
1 parent 1c5b875 commit 985bd11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/blocks/box/Box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const StyledBox = styled.div.withConfig({
`;
const Box = forwardRef<HTMLElement, BoxProps>(({ as = 'div', ...props }, ref) => {
const { mode } = useBlocksTheme();
// TODO: We need to remove color dependency from BlocksColors | ThemeModeColors to fix this error
return (
<StyledBox
as={as}
Expand Down
5 changes: 3 additions & 2 deletions src/blocks/box/Box.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
ValueOf,
} from '../Blocks.types';
import { FlattenSimpleInterpolation } from 'styled-components';
import { ThemeColors } from 'blocks/theme/Theme.types';

export type BoxResponsiveProps = {
/* Sets align-items css property */
Expand Down Expand Up @@ -49,9 +50,9 @@ export type BoxNonResponsiveProps = {
/* Sets border-radius css property */
borderRadius?: RadiusType;
/* Sets background-color css property */
backgroundColor?: BlocksColors | ThemeModeColors;
backgroundColor?: BlocksColors | ThemeModeColors | ThemeColors;
/* Sets color css property */
color?: BlocksColors | ThemeModeColors;
color?: BlocksColors | ThemeModeColors | ThemeColors;
/* Sets cursor css property */
cursor?: CSSProperties['cursor'];
/* Sets position css property */
Expand Down

0 comments on commit 985bd11

Please sign in to comment.