Skip to content

Commit

Permalink
revert: "fix: __context not passed to some components (#345)"
Browse files Browse the repository at this point in the history
This reverts commit c2f4d56.
  • Loading branch information
dalechyn committed Jun 16, 2024
1 parent 2f7d0bb commit d056eff
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/ui/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export function Divider<vars extends Vars = DefaultVars>(
resolvedDirection === 'horizontal' ? horizontalProps : verticalProps
return (
<Box
__context={__context}
backgroundColor={color ?? { custom: 'rgba(255,255,255,0.5)' }}
{...resolvedProps}
/>
Expand Down
3 changes: 0 additions & 3 deletions src/ui/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ export type ImageProps<vars extends Vars = DefaultVars> = {

export function Image<vars extends Vars>(props: ImageProps<vars>) {
const {
// @ts-ignore - private
__context,
borderRadius,
borderBottomLeftRadius,
borderBottomRightRadius,
Expand All @@ -38,7 +36,6 @@ export function Image<vars extends Vars>(props: ImageProps<vars>) {
} = props
return (
<Box
__context={__context}
borderRadius={borderRadius}
borderBottomLeftRadius={borderBottomLeftRadius}
borderBottomRightRadius={borderBottomRightRadius}
Expand Down
15 changes: 2 additions & 13 deletions src/ui/Spacer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ export type SpacerProps<vars extends Vars = DefaultVars> = {
size?: VariableValue<'width', keyof vars['units']>
}

export function Spacer<vars extends Vars>({
// @ts-ignore - private
__context,
size,
}: SpacerProps<vars>) {
return (
<Box
__context={__context}
grow={size ? undefined : true}
height={size}
width={size}
/>
)
export function Spacer<vars extends Vars>({ size }: SpacerProps<vars>) {
return <Box grow={size ? undefined : true} height={size} width={size} />
}
3 changes: 0 additions & 3 deletions src/ui/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ const alignToAlignItems = {
} as const

export function Text<vars extends Vars>({
// @ts-ignore - private
__context,
align,
children,
color,
Expand All @@ -57,7 +55,6 @@ export function Text<vars extends Vars>({
}: TextProps<vars>) {
return (
<Box
__context={__context}
alignItems={align ? (alignToAlignItems as any)[align] : undefined}
color={color}
fontFamily={font}
Expand Down

0 comments on commit d056eff

Please sign in to comment.