Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [MAJOR] Replaced JavaScript theme system with CSS custom properties (`--kiba-*`)
- [MAJOR] Updated to Storybook 10 with CSF3 format and MDX documentation
- [MINOR] Changed `ContainingView` to not make children automatically have `overflow: auto`
- [MINOR] Added `maxWidth` prop to `ContainingView`

### Removed

Expand Down
3 changes: 2 additions & 1 deletion src/wrappers/containingView/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import { WrapperView } from '../wrappingComponent';

export interface IContainingViewProps extends IWrapperProps {
isCenteredHorizontally?: boolean;
maxWidth?: string;
Copy link

Copilot AI Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new maxWidth prop needs a Storybook story example demonstrating its usage. According to CONTRIBUTING.md: "Every component must be documented, and every variant must have a story example."

Consider adding a story that shows how to use a custom maxWidth value, for example:

export const CustomMaxWidth: Story = {
  render: (args) => (
    <ContainingView {...args}>
      <Box variant='card'>
        <Text>Content constrained to custom width</Text>
      </Box>
    </ContainingView>
  ),
  args: {
    maxWidth: '500px',
  },
};

This will help users discover and understand how to use the maxWidth prop.

Copilot generated this review using guidance from repository custom instructions.
}

export function ContainingView(props: IContainingViewProps): React.ReactElement {
const isCenteredHorizontally = props.isCenteredHorizontally ?? true;
const wrapperStyle: React.CSSProperties = {
maxWidth: 'var(--kiba-screen-width-max)',
maxWidth: props.maxWidth ?? 'var(--kiba-screen-width-max)',
width: '100%',
...(isCenteredHorizontally ? { marginLeft: 'auto', marginRight: 'auto' } : {}),
};
Expand Down
Loading