Skip to content

columnBreakpoint is not working #583

@trungbui2000

Description

@trungbui2000

Is the prop columnBreakpoint working for anyone? I am using Remix and this is the code that I have in my route.tsx file.

export default function Component() {
  return (
      <div className='w-100'>
        <Crossword data={data} theme={{ columnBreakpoint: '200px' }} />
      </div>
  );
}

Attached below is what I am seeing on my page. So even when the page width is more than 200 pixels, the clue does not shift to the bottom.
Image

I looked into the source code for the Crossword component, mainly the Crossword.tsx file. I found the ClueWrapper line here

const CluesWrapper = styled.div.attrs((/* props */) => ({
  className: 'clues',
}))`
  padding: 0 1em;
  flex: 1 2 25%;

  @media (max-width: ${(props) => props.theme.columnBreakpoint}) {
    margin-top: 2em;
  }
....
`;

I was wondering if styled.div.attrs line needs to pass a prop param as well? Because it seems that regardless of which ever props I pass, the maximum width is not being changed.

Also, a few line above the shown snippet (link), there is a commented out code line which commented the original columnbreakpoint prop, I wonder if this is intentional or anyone else seeing an issue where their columnBreakpoint is not working as intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions